libnl
3.2.3
|
00001 /* 00002 * netlink/route/link/vlan.h VLAN interface 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation version 2.1 00007 * of the License. 00008 * 00009 * Copyright (c) 2003-2008 Thomas Graf <tgraf@suug.ch> 00010 */ 00011 00012 #ifndef NETLINK_LINK_VLAN_H_ 00013 #define NETLINK_LINK_VLAN_H_ 00014 00015 #include <netlink/netlink.h> 00016 #include <netlink/route/link.h> 00017 00018 #ifdef __cplusplus 00019 extern "C" { 00020 #endif 00021 00022 struct vlan_map 00023 { 00024 uint32_t vm_from; 00025 uint32_t vm_to; 00026 }; 00027 00028 #define VLAN_PRIO_MAX 7 00029 00030 extern int rtnl_link_is_vlan(struct rtnl_link *); 00031 00032 extern char * rtnl_link_vlan_flags2str(int, char *, size_t); 00033 extern int rtnl_link_vlan_str2flags(const char *); 00034 00035 extern int rtnl_link_vlan_set_id(struct rtnl_link *, uint16_t); 00036 extern int rtnl_link_vlan_get_id(struct rtnl_link *); 00037 00038 extern int rtnl_link_vlan_set_flags(struct rtnl_link *, 00039 unsigned int); 00040 extern int rtnl_link_vlan_unset_flags(struct rtnl_link *, 00041 unsigned int); 00042 extern int rtnl_link_vlan_get_flags(struct rtnl_link *); 00043 00044 extern int rtnl_link_vlan_set_ingress_map(struct rtnl_link *, 00045 int, uint32_t); 00046 extern uint32_t * rtnl_link_vlan_get_ingress_map(struct rtnl_link *); 00047 00048 extern int rtnl_link_vlan_set_egress_map(struct rtnl_link *, 00049 uint32_t, int); 00050 extern struct vlan_map *rtnl_link_vlan_get_egress_map(struct rtnl_link *, 00051 int *); 00052 00053 #ifdef __cplusplus 00054 } 00055 #endif 00056 00057 #endif