add portmap support to userland

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 36284
This commit is contained in:
John Crispin
2013-04-09 14:19:13 +00:00
parent fff58a5801
commit 04dcd12c91
4 changed files with 95 additions and 2 deletions

View File

@@ -109,6 +109,7 @@ enum swlib_port_flags {
struct switch_dev;
struct switch_attr;
struct switch_port;
struct switch_port_map;
struct switch_val;
struct uci_package;
@@ -123,6 +124,7 @@ struct switch_dev {
struct switch_attr *ops;
struct switch_attr *port_ops;
struct switch_attr *vlan_ops;
struct switch_portmap *maps;
struct switch_dev *next;
void *priv;
};
@@ -154,11 +156,22 @@ struct switch_port {
unsigned int flags;
};
struct switch_portmap {
unsigned int virt;
const char *segment;
};
/**
* swlib_list: list all switches
*/
void swlib_list(void);
/**
* swlib_print_portmap: get portmap
* @dev: switch device struct
*/
void swlib_print_portmap(struct switch_dev *dev, char *segment);
/**
* swlib_connect: connect to the switch through netlink
* @name: name of the ethernet interface,