2 * src/nl-pktloc-lookup.c Lookup packet location alias
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation version 2.1
9 * Copyright (c) 2010 Thomas Graf <tgraf@suug.ch>
12 #include <netlink/cli/utils.h>
13 #include <netlink/route/pktloc.h>
15 static void print_usage(void)
17 printf("Usage: nl-pktloc-lookup <name>\n");
21 int main(int argc, char *argv[])
23 struct rtnl_pktloc *loc;
29 if ((err = rtnl_pktloc_lookup(argv[1], &loc)) < 0)
30 nl_cli_fatal(err, "Unable to lookup packet location: %s",
33 printf("%s: %u %u+%u 0x%x %u\n", loc->name, loc->align,
34 loc->layer, loc->offset, loc->mask, loc->flags);