projects
/
openwrt-github
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[swconfig] add portmap support to userland
[openwrt-github/.git]
/
package
/
network
/
config
/
swconfig
/
src
/
swlib.h
diff --git
a/package/network/config/swconfig/src/swlib.h
b/package/network/config/swconfig/src/swlib.h
index 02fa45610c9be031993b0cb01074db2b9d18a478..016f74b4fd1c8d9194ff2e4904a3c3dd4cc4ec33 100644
(file)
--- a/
package/network/config/swconfig/src/swlib.h
+++ b/
package/network/config/swconfig/src/swlib.h
@@
-109,6
+109,7
@@
enum swlib_port_flags {
struct switch_dev;
struct switch_attr;
struct switch_port;
struct switch_dev;
struct switch_attr;
struct switch_port;
+struct switch_port_map;
struct switch_val;
struct uci_package;
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_attr *ops;
struct switch_attr *port_ops;
struct switch_attr *vlan_ops;
+ struct switch_portmap *maps;
struct switch_dev *next;
void *priv;
};
struct switch_dev *next;
void *priv;
};
@@
-154,11
+156,22
@@
struct switch_port {
unsigned int flags;
};
unsigned int flags;
};
+struct switch_portmap {
+ unsigned int virt;
+ const char *segment;
+};
+
/**
* swlib_list: list all switches
*/
void swlib_list(void);
/**
* 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,
/**
* swlib_connect: connect to the switch through netlink
* @name: name of the ethernet interface,