blob: c816be45ffdf604860824919142ed02a39738df0 [file] [log] [blame]
xjb04a4022021-11-25 15:01:52 +08001#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
13int HwNatAddEntry(struct hwnat_tuple *opt);
14int HwNatDelEntry(struct hwnat_tuple *opt);
15int HwNatDumpEntry(unsigned int entry_num);
16int HwNatBindEntry(unsigned int entry_num);
17int HwNatUnBindEntry(unsigned int entry_num);
18int HwNatDropEntry(unsigned int entry_num);
19int HwNatInvalidEntry(unsigned int entry_num);
20int HwNatDscpRemarkEbl(struct hwnat_qos_args *opt);
21int HwNatVpriRemarkEbl(struct hwnat_qos_args *opt);
22int HwNatSetFoeWeight(struct hwnat_qos_args *opt);
23int HwNatSetAclWeight(struct hwnat_qos_args *opt);
24int HwNatSetDscpWeight(struct hwnat_qos_args *opt);
25int HwNatSetVpriWeight(struct hwnat_qos_args *opt);
26int HwNatSetDscp_Up(struct hwnat_qos_args *opt);
27int HwNatSetUp_InDscp(struct hwnat_qos_args *opt);
28int HwNatSetUp_OutDscp(struct hwnat_qos_args *opt);
29int HwNatSetUp_Vpri(struct hwnat_qos_args *opt);
30int HwNatSetUp_Ac(struct hwnat_qos_args *opt);
31int HwNatSetSchMode(struct hwnat_qos_args *opt);
32int HwNatSetSchWeight(struct hwnat_qos_args *opt);
33int HwNatSetBindThreshold(struct hwnat_config_args *opt);
34int HwNatSetMaxEntryRateLimit(struct hwnat_config_args *opt);
35int HwNatSetRuleSize(struct hwnat_config_args *opt);
36int HwNatSetKaInterval(struct hwnat_config_args *opt);
37int HwNatSetUnbindLifeTime(struct hwnat_config_args *opt);
38int HwNatSetBindLifeTime(struct hwnat_config_args *opt);
39int HwNatSetVID(struct hwnat_config_args *opt);
40int HwNatSetBindDir(struct hwnat_config_args *opt);
41int HwNatGetAllEntries(struct hwnat_args *opt);
42int HwNatDebug(unsigned int debug);
43int HwNatGetAGCnt(struct hwnat_ac_args *opt);
44#if defined (CONFIG_PPE_MCAST)
45int HwNatMcastIns(struct hwnat_mcast_args *opt);
46int HwNatMcastDel(struct hwnat_mcast_args *opt);
47int HwNatMcastDump(void);
48#endif
49#if defined (CONFIG_PPE_MIB)
50int HwNatMibDumpEntry(unsigned int entry_num);
51int HwNatMibGet(struct hwnat_tuple *opt);
52int HwNatMibDramDumpEntry(unsigned int entry_num);
53#if defined CONFIG_COLGIN_SUPPORT
54int HwNatMibGetAllIP(struct hwnat_mib_all_ip_args *opt);
55#endif
56#endif
57int HwNatTblClear(void);
58int HwNatCacheDumpEntry(void);
59int HwNatDumpDport(void);
60int HwNatInvalEntry(unsigned int entry_num);
61int HwNatHookModify(struct hwnat_tuple *opt, int clear);
62#endif