summaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/files/include/net/rtl/rtl865x_fdb_api.h
diff options
context:
space:
mode:
authorRoman Yeryomin <roman@advem.lv>2012-09-13 00:40:35 +0300
committerRoman Yeryomin <roman@advem.lv>2012-12-03 00:13:21 +0200
commit5deb3317cb51ac52de922bb55f8492624018906d (patch)
treec2fbe6346699d9bb0f2100490c3029519bb8fde8 /target/linux/realtek/files/include/net/rtl/rtl865x_fdb_api.h
parent0239d37124f9184b478a42de8a7fa1bc85a6a6fe (diff)
Add realtek target files
Signed-off-by: Roman Yeryomin <roman@advem.lv>
Diffstat (limited to 'target/linux/realtek/files/include/net/rtl/rtl865x_fdb_api.h')
-rw-r--r--target/linux/realtek/files/include/net/rtl/rtl865x_fdb_api.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/target/linux/realtek/files/include/net/rtl/rtl865x_fdb_api.h b/target/linux/realtek/files/include/net/rtl/rtl865x_fdb_api.h
new file mode 100644
index 000000000..b2fb2390a
--- /dev/null
+++ b/target/linux/realtek/files/include/net/rtl/rtl865x_fdb_api.h
@@ -0,0 +1,43 @@
+
+#ifndef RTL865X_FDB_API_H
+#define RTL865X_FDB_API_H
+
+#define RTL_LAN_FID 0
+#if defined (CONFIG_RTL_IVL_SUPPORT)
+#define RTL_WAN_FID 1
+#else
+#define RTL_WAN_FID 0
+#endif
+
+#define FDB_STATIC 0x01 /* flag for FDB: process static entry only */
+#define FDB_DYNAMIC 0x02 /* flag for FDB: process dynamic entry only */
+
+void update_hw_l2table(const char *srcName,const unsigned char *addr);
+int32 rtl_get_hw_fdb_age(uint32 fid,ether_addr_t *mac, uint32 flags);
+int32 rtl865x_addAuthFDBEntry(const unsigned char *addr, int32 auth, int32 port);
+int32 rtl865x_setRestrictPortNum(int32 port, uint8 isEnable, int32 number);
+int32 rtl865x_check_authfdbentry_Byport(int32 port_num, const unsigned char *macAddr);
+int32 rtl865x_enableLanPortNumRestrict(uint8 isEnable);
+
+#if defined(CONFIG_RTL865X_LANPORT_RESTRICTION)
+#define LAN_RESTRICT_PORT_NUMBER 9
+
+typedef struct _lan_restrict_info
+{
+ int16 port_num;
+ int16 enable;
+ int32 max_num;
+ int32 curr_num;
+}lan_restrict_info;
+
+extern lan_restrict_info lan_restrict_tbl[LAN_RESTRICT_PORT_NUMBER];
+
+int32 rtl_check_fdb_entry_check_exist(uint32 fid, ether_addr_t *mac, uint32 flags);
+int32 rtl_check_fdb_entry_check_srcBlock(uint32 fid, ether_addr_t *mac, int32 *SrcBlk);
+int32 lanrestrict_callbackFn_for_add_fdb(void *param);
+int32 lanrestrict_callbackFn_for_del_fdb(void *param);
+int32 lanrestrict_unRegister_event(void);
+int32 lanrestrict_register_event(void);
+#endif /* defined(CONFIG_RTL865X_LANPORT_RESTRICTION) */
+
+#endif