summaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/files/include/net/rtl/rtl865x_fdb_api.h
diff options
context:
space:
mode:
authorRoman Yeryomin <roman@advem.lv>2013-05-17 20:40:24 +0300
committerRoman Yeryomin <roman@advem.lv>2013-05-17 20:40:24 +0300
commite6d87036412b952cb083eff2dc716aee97a771f2 (patch)
tree273dd3daaa85553832d3cc6d48276229dc7fbe09 /target/linux/realtek/files/include/net/rtl/rtl865x_fdb_api.h
parenta18fec42221baa52fff4c5ffd45ec8f32e3add36 (diff)
Move to rsdk 3.2.4. Compiles cleanly.
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.h60
1 files changed, 58 insertions, 2 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
index b2fb2390a..edbab8ccc 100644
--- a/target/linux/realtek/files/include/net/rtl/rtl865x_fdb_api.h
+++ b/target/linux/realtek/files/include/net/rtl/rtl865x_fdb_api.h
@@ -10,17 +10,62 @@
#endif
#define FDB_STATIC 0x01 /* flag for FDB: process static entry only */
-#define FDB_DYNAMIC 0x02 /* flag for FDB: process dynamic entry only */
+#define FDB_DYNAMIC 0x02 /* flag for FDB: process dynamic entry only */
+
+#define RTL865x_FDB_NUMBER 4
+#define RTL865x_L2_TYPEI 0x0001 /* Referenced by ARP/PPPoE */
+#define RTL865x_L2_TYPEII 0x0002 /* Referenced by Protocol */
+#define RTL865x_L2_TYPEIII 0x0004 /* Referenced by PCI/Extension Port */
+#define CONFIG_RTL865X_SYNC_L2 1
+#define RTL865X_FDBENTRY_TIMEOUT 0x1001 /*fdb entry time out*/
+#define RTL865X_FDBENTRY_450SEC 0x1002 /*fdb entry 450s timing*/
+#define RTL865X_FDBENTRY_300SEC 0x1004 /*fdb entry 300s timing*/
+#define RTL865X_FDBENTRY_150SEC 0x1008 /*fdb entry 150s timing*/
+
+/*#define ETHER_ADDR_LEN 6
+typedef struct ether_addr_s {
+ uint8 octet[ETHER_ADDR_LEN];
+} ether_addr_t;*/
+/*
+typedef struct rtl865x_tblAsicDrv_l2Param_s {
+ ether_addr_t macAddr;
+ uint32 memberPortMask; //extension ports [rtl8651_totalExtPortNum-1:0] are located at bits [RTL8651_PORT_NUMBER+rtl8651_totalExtPortNum-1:RTL8651_PORT_NUMBER]
+ uint32 ageSec;
+ uint32 cpu:1,
+ srcBlk:1,
+ isStatic:1,
+ nhFlag:1,
+ fid:2,
+ auth:1;
+
+} rtl865x_tblAsicDrv_l2Param_t;*/
+
+//extern typedef struct rtl865x_tblAsicDrv_l2Param_s rtl865x_tblAsicDrv_l2Param_t;
+
+
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_addAuthFDBEntry(const unsigned char *addr, int32 auth, int32 port, int32 srcblk);
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);
+int32 rtl865x_delAuthLanFDBEntry(uint16 l2Type, const unsigned char *addr);
+int32 rtl865x_delLanFDBEntry(uint16 l2Type, const unsigned char *addr);
+
+int32 rtl865x_arrangeFdbEntry(const unsigned char *timeout_addr, int32 *port);
+//extern int32 rtl865x_Lookup_fdb_entry(uint32 fid, ether_addr_t *mac, uint32 flags, uint32 *col_num, rtl865x_tblAsicDrv_l2Param_t *L2buff);
+
+int32 rtl865x_getPortNum(const unsigned char *addr);
+int32 rtl865x_ConvertPortMasktoPortNum(int32 portmask);
+int32 rtl865x_addFDBEntry(const unsigned char *addr);
+
#if defined(CONFIG_RTL865X_LANPORT_RESTRICTION)
#define LAN_RESTRICT_PORT_NUMBER 9
+#define RTL_LAN_RESTRICT_STAT2 2
+#define RTL_LAN_RESTRICT_STAT1 1
+#define RTL_LAN_RESTRICT_STAT0 0
typedef struct _lan_restrict_info
{
@@ -32,6 +77,17 @@ typedef struct _lan_restrict_info
extern lan_restrict_info lan_restrict_tbl[LAN_RESTRICT_PORT_NUMBER];
+
+//int32 rtl865x_addAuthFDBEntry_hooks(struct net_bridge_fdb_entry *fdb,const unsigned char *addr);
+
+
+int32 lan_restrict_getBlockAddr(int32 port , const unsigned char *swap_addr);
+int32 lan_restrict_CheckStatusByport(int32 port);
+
+
+
+
+
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);