xj | b04a402 | 2021-11-25 15:01:52 +0800 | [diff] [blame] | 1 | #ifndef __HW_NAT_API |
| 2 | #define __HW_NAT_API |
| 3 | |
| 4 | #define NIPQUAD(addr) \ |
| 5 | ((unsigned char *)&addr)[3], \ |
| 6 | ((unsigned char *)&addr)[2], \ |
| 7 | ((unsigned char *)&addr)[1], \ |
| 8 | ((unsigned char *)&addr)[0] |
| 9 | #define NIPHALF(addr) \ |
| 10 | ((unsigned short *)&addr)[1], \ |
| 11 | ((unsigned short *)&addr)[0] |
| 12 | |
| 13 | int HwNatAddEntry(struct hwnat_tuple *opt); |
| 14 | int HwNatDelEntry(struct hwnat_tuple *opt); |
| 15 | int HwNatDumpEntry(unsigned int entry_num); |
| 16 | int HwNatBindEntry(unsigned int entry_num); |
| 17 | int HwNatUnBindEntry(unsigned int entry_num); |
| 18 | int HwNatDropEntry(unsigned int entry_num); |
| 19 | int HwNatInvalidEntry(unsigned int entry_num); |
| 20 | int HwNatDscpRemarkEbl(struct hwnat_qos_args *opt); |
| 21 | int HwNatVpriRemarkEbl(struct hwnat_qos_args *opt); |
| 22 | int HwNatSetFoeWeight(struct hwnat_qos_args *opt); |
| 23 | int HwNatSetAclWeight(struct hwnat_qos_args *opt); |
| 24 | int HwNatSetDscpWeight(struct hwnat_qos_args *opt); |
| 25 | int HwNatSetVpriWeight(struct hwnat_qos_args *opt); |
| 26 | int HwNatSetDscp_Up(struct hwnat_qos_args *opt); |
| 27 | int HwNatSetUp_InDscp(struct hwnat_qos_args *opt); |
| 28 | int HwNatSetUp_OutDscp(struct hwnat_qos_args *opt); |
| 29 | int HwNatSetUp_Vpri(struct hwnat_qos_args *opt); |
| 30 | int HwNatSetUp_Ac(struct hwnat_qos_args *opt); |
| 31 | int HwNatSetSchMode(struct hwnat_qos_args *opt); |
| 32 | int HwNatSetSchWeight(struct hwnat_qos_args *opt); |
| 33 | int HwNatSetBindThreshold(struct hwnat_config_args *opt); |
| 34 | int HwNatSetMaxEntryRateLimit(struct hwnat_config_args *opt); |
| 35 | int HwNatSetRuleSize(struct hwnat_config_args *opt); |
| 36 | int HwNatSetKaInterval(struct hwnat_config_args *opt); |
| 37 | int HwNatSetUnbindLifeTime(struct hwnat_config_args *opt); |
| 38 | int HwNatSetBindLifeTime(struct hwnat_config_args *opt); |
| 39 | int HwNatSetVID(struct hwnat_config_args *opt); |
| 40 | int HwNatSetBindDir(struct hwnat_config_args *opt); |
| 41 | int HwNatGetAllEntries(struct hwnat_args *opt); |
| 42 | int HwNatDebug(unsigned int debug); |
| 43 | int HwNatGetAGCnt(struct hwnat_ac_args *opt); |
| 44 | #if defined (CONFIG_PPE_MCAST) |
| 45 | int HwNatMcastIns(struct hwnat_mcast_args *opt); |
| 46 | int HwNatMcastDel(struct hwnat_mcast_args *opt); |
| 47 | int HwNatMcastDump(void); |
| 48 | #endif |
| 49 | #if defined (CONFIG_PPE_MIB) |
| 50 | int HwNatMibDumpEntry(unsigned int entry_num); |
| 51 | int HwNatMibGet(struct hwnat_tuple *opt); |
| 52 | int HwNatMibDramDumpEntry(unsigned int entry_num); |
| 53 | #if defined CONFIG_COLGIN_SUPPORT |
| 54 | int HwNatMibGetAllIP(struct hwnat_mib_all_ip_args *opt); |
| 55 | #endif |
| 56 | #endif |
| 57 | int HwNatTblClear(void); |
| 58 | int HwNatCacheDumpEntry(void); |
| 59 | int HwNatDumpDport(void); |
| 60 | int HwNatInvalEntry(unsigned int entry_num); |
| 61 | int HwNatHookModify(struct hwnat_tuple *opt, int clear); |
| 62 | #endif |