team: add binary option type

For transfering generic binary data (e.g. BPF code), introduce new
binary option type.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko 2012-04-04 12:16:26 +00:00 committed by David S. Miller
parent bd856615c1
commit 2615598fc1
2 changed files with 34 additions and 4 deletions

View file

@ -68,6 +68,7 @@ struct team_mode_ops {
enum team_option_type {
TEAM_OPTION_TYPE_U32,
TEAM_OPTION_TYPE_STRING,
TEAM_OPTION_TYPE_BINARY,
};
struct team_option {
@ -82,6 +83,13 @@ struct team_option {
bool removed;
};
struct team_option_binary {
u32 data_len;
void *data;
};
#define team_optarg_tbinary(arg) (*((struct team_option_binary **) arg))
struct team_mode {
struct list_head list;
const char *kind;