Skip to content

Commit

Permalink
zebra: Cleanup string generation via clang
Browse files Browse the repository at this point in the history
Separate commit for clang-format cleanup of string
messages because I felt it would hide the actual
changes being made to the system.

Signed-off-by: Donald Sharp <[email protected]>
  • Loading branch information
donaldsharp committed Oct 12, 2023
1 parent 6fe6abf commit f548d66
Showing 1 changed file with 42 additions and 40 deletions.
82 changes: 42 additions & 40 deletions zebra/kernel_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,46 +76,48 @@
*/
#define NL_DEFAULT_BATCH_SEND_THRESHOLD (15 * NL_PKT_BUF_SIZE)

static const struct message nlmsg_str[] = {{RTM_NEWROUTE, "RTM_NEWROUTE"},
{RTM_DELROUTE, "RTM_DELROUTE"},
{RTM_GETROUTE, "RTM_GETROUTE"},
{RTM_NEWLINK, "RTM_NEWLINK"},
{RTM_SETLINK, "RTM_SETLINK"},
{RTM_DELLINK, "RTM_DELLINK"},
{RTM_GETLINK, "RTM_GETLINK"},
{RTM_NEWADDR, "RTM_NEWADDR"},
{RTM_DELADDR, "RTM_DELADDR"},
{RTM_GETADDR, "RTM_GETADDR"},
{RTM_NEWNEIGH, "RTM_NEWNEIGH"},
{RTM_DELNEIGH, "RTM_DELNEIGH"},
{RTM_GETNEIGH, "RTM_GETNEIGH"},
{RTM_NEWRULE, "RTM_NEWRULE"},
{RTM_DELRULE, "RTM_DELRULE"},
{RTM_GETRULE, "RTM_GETRULE"},
{RTM_NEWNEXTHOP, "RTM_NEWNEXTHOP"},
{RTM_DELNEXTHOP, "RTM_DELNEXTHOP"},
{RTM_GETNEXTHOP, "RTM_GETNEXTHOP"},
{RTM_NEWNETCONF, "RTM_NEWNETCONF"},
{RTM_DELNETCONF, "RTM_DELNETCONF"},
{RTM_NEWTUNNEL, "RTM_NEWTUNNEL"},
{RTM_DELTUNNEL, "RTM_DELTUNNEL"},
{RTM_GETTUNNEL, "RTM_GETTUNNEL"},
{RTM_NEWQDISC, "RTM_NEWQDISC"},
{RTM_DELQDISC, "RTM_DELQDISC"},
{RTM_GETQDISC, "RTM_GETQDISC"},
{RTM_NEWTCLASS, "RTM_NEWTCLASS"},
{RTM_DELTCLASS, "RTM_DELTCLASS"},
{RTM_GETTCLASS, "RTM_GETTCLASS"},
{RTM_NEWTFILTER, "RTM_NEWTFILTER"},
{RTM_DELTFILTER, "RTM_DELTFILTER"},
{RTM_GETTFILTER, "RTM_GETTFILTER"},
{RTM_NEWVLAN, "RTM_NEWVLAN"},
{RTM_DELVLAN, "RTM_DELVLAN"},
{RTM_GETVLAN, "RTM_GETVLAN"},
{RTM_NEWCHAIN, "RTM_NEWCHAIN"},
{RTM_DELCHAIN, "RTM_DELCHAIN"},
{RTM_GETCHAIN, "RTM_GETCHAIN"},
{0}};
static const struct message nlmsg_str[] = {
{ RTM_NEWROUTE, "RTM_NEWROUTE" },
{ RTM_DELROUTE, "RTM_DELROUTE" },
{ RTM_GETROUTE, "RTM_GETROUTE" },
{ RTM_NEWLINK, "RTM_NEWLINK" },
{ RTM_SETLINK, "RTM_SETLINK" },
{ RTM_DELLINK, "RTM_DELLINK" },
{ RTM_GETLINK, "RTM_GETLINK" },
{ RTM_NEWADDR, "RTM_NEWADDR" },
{ RTM_DELADDR, "RTM_DELADDR" },
{ RTM_GETADDR, "RTM_GETADDR" },
{ RTM_NEWNEIGH, "RTM_NEWNEIGH" },
{ RTM_DELNEIGH, "RTM_DELNEIGH" },
{ RTM_GETNEIGH, "RTM_GETNEIGH" },
{ RTM_NEWRULE, "RTM_NEWRULE" },
{ RTM_DELRULE, "RTM_DELRULE" },
{ RTM_GETRULE, "RTM_GETRULE" },
{ RTM_NEWNEXTHOP, "RTM_NEWNEXTHOP" },
{ RTM_DELNEXTHOP, "RTM_DELNEXTHOP" },
{ RTM_GETNEXTHOP, "RTM_GETNEXTHOP" },
{ RTM_NEWNETCONF, "RTM_NEWNETCONF" },
{ RTM_DELNETCONF, "RTM_DELNETCONF" },
{ RTM_NEWTUNNEL, "RTM_NEWTUNNEL" },
{ RTM_DELTUNNEL, "RTM_DELTUNNEL" },
{ RTM_GETTUNNEL, "RTM_GETTUNNEL" },
{ RTM_NEWQDISC, "RTM_NEWQDISC" },
{ RTM_DELQDISC, "RTM_DELQDISC" },
{ RTM_GETQDISC, "RTM_GETQDISC" },
{ RTM_NEWTCLASS, "RTM_NEWTCLASS" },
{ RTM_DELTCLASS, "RTM_DELTCLASS" },
{ RTM_GETTCLASS, "RTM_GETTCLASS" },
{ RTM_NEWTFILTER, "RTM_NEWTFILTER" },
{ RTM_DELTFILTER, "RTM_DELTFILTER" },
{ RTM_GETTFILTER, "RTM_GETTFILTER" },
{ RTM_NEWVLAN, "RTM_NEWVLAN" },
{ RTM_DELVLAN, "RTM_DELVLAN" },
{ RTM_GETVLAN, "RTM_GETVLAN" },
{ RTM_NEWCHAIN, "RTM_NEWCHAIN" },
{ RTM_DELCHAIN, "RTM_DELCHAIN" },
{ RTM_GETCHAIN, "RTM_GETCHAIN" },
{ 0 }
};

static const struct message rtproto_str[] = {
{RTPROT_REDIRECT, "redirect"},
Expand Down

0 comments on commit f548d66

Please sign in to comment.