Skip to content

Commit

Permalink
lldptool: support multiple arguments instead of one
Browse files Browse the repository at this point in the history
Adds support for getting and setting multiple arguments
of the form: arg or arg=value
on the lldptool command line.  For example, multiple
IEEE ETS settings can now be queried or set with one
command.

Signed-off-by: John Fastabend <[email protected]>
  • Loading branch information
snackewm authored and John Fastabend committed Jun 17, 2011
1 parent 8564e18 commit 092a3d7
Show file tree
Hide file tree
Showing 12 changed files with 757 additions and 205 deletions.
1 change: 1 addition & 0 deletions include/lldp_mand_clif.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ typedef enum {
op_local = 0x0040,
op_neighbor = 0x0080,
op_arg = 0x0100,
op_argval = 0x0200,
} lldp_op;

struct tlv {
Expand Down
5 changes: 5 additions & 0 deletions include/lldp_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ int get_master(const char *ifname);
int get_addr(const char *ifname, int domain, void *buf);
int check_link_status(const char *ifname);

#define MAX_ARGS 8
int get_arg_val_list(char *ibuf, int ilen, int *ioff,
char **args, char **argvals);
int get_arg_list(char *ibuf, int ilen, int *ioff, char **args);

#define ntohll(x) be64_to_cpu(x)
#define htonll(x) cpu_to_be64(x)

Expand Down
Loading

0 comments on commit 092a3d7

Please sign in to comment.