[Feature][T106_eSDK]T106-V2.01.01.02P56U06.AP.15.11_CAP.15.11(SDK4.6)diff_17.02(SDK4.7)
Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I9dc02273b59a074828ab3eeaa84306415b153138
diff --git a/upstream/linux-5.10/include/net/SI/netioc_proc.h b/upstream/linux-5.10/include/net/SI/netioc_proc.h
new file mode 100755
index 0000000..f0c8aa4
--- /dev/null
+++ b/upstream/linux-5.10/include/net/SI/netioc_proc.h
@@ -0,0 +1,492 @@
+/************************************************************************
+*¹¦ÄܽéÉÜ£ºlinuxÖÐÍøÂçfastnat¡¢fastbrÏà¹Ø²Ù×÷½Ó¿Ú
+*¸ºÔðÈË£º
+*±¸·ÝÈË£º
+*ÐÞ¸ÄÈÕ£º
+*ÐÞ¸ÄÄÚÈÝ£º
+*°æ±¾ºÅ£º
+************************************************************************/
+#ifndef _NETIO_PROC_H_
+#define _NETIO_PROC_H_
+
+
+#include <net/SI/net_track.h>
+#include <net/SI/ext_mem.h>
+
+
+#define PC_MAX_NUM 100
+#define DEV_NAME_LEN 50
+
+#define DEV_NAME_LEN_20 20
+
+#define ETH_ALEN 6
+
+#define SLAB_NUM 21
+
+#define HASH_ARRAY_COUNT 512
+//SKBͳ¼ÆÖµ£¬°üÀ¨Òì³£µãµÄͳ¼ÆÖµ
+enum skbinfo_type{
+ SKB_TYPE_ALL = 0, //skb½á¹¹ÌåÕýÔÚ¹¤×÷µÄ¸öÊý
+ SKB_TYPE_DATA, //SKBÖеÄslab»úÖÆµÄdataÕýÔÚ¹¤×÷µÄ¸öÊý£¬°üº¬SKB_TYPE_TOCP£¬µ«²»°üº¬SKB_TYPE_FROMCP
+ SKB_TYPE_TOCP, //·¢ÍùCPµÄskbÕýÔÚ¹¤×÷µÄ¸öÊý
+ SKB_TYPE_FROMCP, //´ÓCP½ÓÊÕµ½µÄPSBUFÕýÔÚ¹¤×÷µÄ¸öÊý
+ SKB_DATA_BYTES, //µ±Ç°ÉêÇëµÄdata×Ü×Ö½ÚÊý £¬ksize·½Ê½ÀÛ¼ÓµÄ
+
+ //ÐÔÄÜÏà¹ØµÄÈ«¾ÖÐÅÏ¢£¬Äں˽öÀÛ¼Ó·¢ÉúµÄ´ÎÊý£¬²»¸ºÔð·ÖÎö
+ SKB_QUEUE_STOP, //xmit_stopÔì³ÉµÄ¶ª°ü¸öÊý£¬ÀÛ¼ÓÖµ
+ SKB_QUEUE_LOCK, //QUEUE_LOCKÔì³ÉµÄ¶ª°ü¸öÊý£¬ÀÛ¼ÓÖµ
+ SKB_COPY_CACHE, //net_cacheÔ´ÎļþÖнøÐÐÈ«¿½±´µÄÀÛ¼ÓÖµ£¬Ä¿Ç°½öÔÚPPPºÍ·ÖƬʱ¿½±´£¬Ó°ÏìÐÔÄÜ
+ SKB_IRQ_FREE, //ͨ¹ýÈíÖжÏÊͷŵÄskb£¬ÐÔÄÜÏà¹Ø
+ SKB_COPY, //Êý¾Ý¿½±´µÄskb£¬ÐÔÄÜÏà¹Ø
+ SKB_FLOOD, //·ººéµÄskb£¬ÐÔÄÜÏà¹Ø
+ SKB_ERRFREE, //devÔ´ÎļþÖдíÎóÊͷŵÄskb¼ÆÊý£¬°üÀ¨SKB_QUEUE_STOPºÍSKB_QUEUE_LOCKÁ½¸ö¼ÆÊýÖµ
+ SKB_FRAG, //½ÓÊÕµ½µÄ·ÖƬ±¨ÎÄ£¬ÐÔÄÜÏà¹Ø
+ SKB_OVER_MTU, //fastÖÐÊý¾Ý³¤¶È´óÓÚ³ö¿Údev MTUʱ£¬fastʧ°Ü¸öÊýͳ¼Æ
+ SKB_LOOP, //ͶµÝ¸øÇý¶¯£¬ÓÖ´ÓÇý¶¯ÊÕµ½µÄÒì³£»Ø»·¸öÊýͳ¼Æ£¬´óÓÚ0±íʾÇý¶¯Òì³£
+ SKB_ALLOC_FIAL, //ÉêÇëskbʧ°ÜµÄ¸öÊýÀÛ¼ÓÖµ
+ SKB_INFO_MAX,
+};
+
+//ÍøÂçÄÚºËÔËÐÐʱµÄͳ¼ÆÖµ£¬ÖØµã¹Ø×¢½á¹¹ÌåµÄÉêÇëµã
+enum net_run_info{
+ BR_MAC_CHANGE = 0, //ÍøÇÅmacµØÖ·±»¸Ä±ä´ÎÊý
+ NEIGH_ALLOC, //neighbourÉêÇë´ÎÊý
+ NEIGH_FREE, //neighbourÊͷŵãÀÛ¼ÓÖµ
+ BR_NEIGH_VARY, //ÇŵãµÄ³ö¿ÚdevµÄMACµØÖ·±»¶à¸öPC¹²Ïí
+ CONN_ALLOC, //CONNÉêÇë´ÎÊýÀÛ¼ÓÖµ
+ CONN_FREE, //CONNÊͷŵãÀÛ¼ÓÖµ
+ BRFDB_ALLOC, //ÇŵãÉêÇë´ÎÊýÀÛ¼ÓÖµ
+ DST_ALLOC, //dst_entryÉêÇëÀÛ¼ÓÖµ
+ DST_FREE, //dst_entryÊͷŵãÀÛ¼ÓÖµ
+ HH_UPDATE, //HH¶þ²ãMACÍ·¸üÐÂÀÛ¼ÓÖµ
+ RT_CACHE_INVALID, //Çå¿Õ·ÓÉcacheµÄÀÛ¼ÓÖµ
+ RT_HASH_ADD, //ÐÂÔört_hash_table½ÚµãµÄÀÛ¼ÓÖµ
+ RT_HASH_DEL, //ɾ³ýrt_hash_table½ÚµãµÄÀÛ¼ÓÖµ
+ SSMAC_CHANGE_INDEV, //ͬһԴMACµØÖ·Èë¿Údev¸Ä±äµÄ´ÎÊý
+ NET_INFO_MAX,
+};
+enum dev_opt_state{
+ DEV_UNOPT=0, //ÈôÓû§Î´×öÈκβÙ×÷£¬³õʼֵΪ0
+ DEV_NOPRESENT, //¶ÔÓ¦!netif_device_presentÒì³££¬±íÃ÷Çý¶¯µ×²ãÉÐδ׼±¸ºÃ
+ DEV_OPENED, //dev is opened
+ DEV_OPEN_FAIL, //open fail
+ DEV_CLOSED, //dev is closed
+};
+
+enum slabinfo_file{
+ FAST_SLAB = 0,
+ SKB_SLAB,
+ BRFDB_SLAB,
+ DST_SLAB,
+ FIB_TRIE_SLAB,
+ FLOW_SLAB,
+ INETPEER_SLAB,
+ INET_HASHTABLES_SLAB,
+ INET_TIMEWAIT_SOCK_SLAB,
+ MYSOCKET_SLAB,
+ NF_CONNTRACK_CORE_SLAB,
+ NF_CONNTRACK_EXCEPT_SLAB,
+ REQUEST_SOCK_SLAB,
+ SOCK_SLAB,
+ SOCKET_SLAB,
+ XFRM6_TUNNEL_SLAB,
+ XT_HASHLIMIT_SLAB,
+ SOCK_ALLOC_PAGES, //ÓÉÓÚÎÞ·¨×¼È·ÕÒµ½Êͷŵ㣬ËùÒÔ½öÓÐ++¶¯×÷£¬--Ó¦¸ÃÓÉput_page´¥·¢
+ IP6_OUTPUT_ALLOC_PAGES, //ÓÉÓÚÎÞ·¨×¼È·ÕÒµ½Êͷŵ㣬ËùÒÔ½öÓÐ++¶¯×÷£¬--Ó¦¸ÃÓÉput_page´¥·¢
+ IP_OUTPUT_ALLOC_PAGES, //ÓÉÓÚÎÞ·¨×¼È·ÕÒµ½Êͷŵ㣬ËùÒÔ½öÓÐ++¶¯×÷£¬--Ó¦¸ÃÓÉput_page´¥·¢
+ SKB_ALLOC_PAGES, //ÓÉÓÚÎÞ·¨×¼È·ÕÒµ½Êͷŵ㣬ËùÒÔ½öÓÐ++¶¯×÷£¬--Ó¦¸ÃÓÉput_page´¥·¢
+};
+
+
+/*±¾µØTCPͳ¼ÆÐÅÏ¢*/
+enum tcp_stat_info
+{
+ TCP_RECV_PKTS = 0, /*½ÓÊÕµÄTCPÊýÄ¿*/
+ TCP_SEND_PKTS, /*·¢Ë͵ÄTCPÊýÄ¿*/
+ TCP_RETRANS_PKTS, /*·¢Ë͵ÄÖØ´«TCPÊýÄ¿*/
+ TCP_RECV_DROPS, /*½ÓÊն˵ÄTCP¶ª°üÊý*/
+ TCP_SEND_DROPS, /*·¢ËͶ˵ÄTCP¶ª°üÊý*/
+ TCP_RST_SEND_NUM, /*·¢Ë͵ÄRSTÊý*/
+ TCP_RST_RECV_NUM, /*½ÓÊÕµÄRSTÊý*/
+ TCP_STATS_MAX,
+};
+
+
+struct tcp_sock_stat
+{
+ unsigned long tcp_recv_num;
+ unsigned long tcp_send_num;
+ unsigned long tcp_retrans_num;
+ unsigned long tcp_recv_drops;
+ unsigned long tcp_send_drops;
+ unsigned long tcp_rst_send;
+ unsigned long tcp_rst_recv;
+};
+
+/****×ÊԴʹÓü°ÉÏÏÞÐÅÏ¢£¬ËùÓбê×¼ÄÚºËÓÐÉÏÏÞÇé¿öµÄ£¬½ÔÐè¼ì²â£¬ÒÔ·ÀÖ¹Òì³£·¢Éú****/
+struct net_max_check_msg
+{
+ /*nf_conntrack*/
+ unsigned long nf_conntrack_max; //nf_conntrack_max = 4832
+ unsigned long nf_conntrack_now; //net->ct.count
+ /*enqueue*/
+ int netdev_max_backlog; //netdev_max_backlog=1000
+ int input_queue_len; //²Î¿´enqueue_to_backlog½Ó¿ÚʵÏÖ
+ int rx_dropped; //ÒòΪÈë¶ÓÁÐÒÑÂúÔì³ÉµÄÈë¶ÓÁжª°üµÄÀÛ¼ÓÖµ
+ /*ÐÔÄÜÏà¹Ø*/
+ int fastnat_link_max; //nf_conntrack_max
+ int fastnat_link_now; //working_list.count
+ int fast6_link_max; //nf_conntrack_max
+ int fast6_link_now; //working_list6.count
+
+ /*ÍøÂçÄÚºËÔËÐÐʱµÄͳ¼ÆÖµ£¬ÖØµã¹Ø×¢½á¹¹ÌåµÄÉêÇëµã*/
+ unsigned long br_mac_change; //ÍøÇÅmacµØÖ·±»¸Ä±ä´ÎÊý
+ unsigned long neigh_alloc; //neighbourÉêÇë´ÎÊý
+ unsigned long neigh_free; //neighbourÊͷŵãÀÛ¼ÓÖµ
+ unsigned long br_neigh_vary; //ÇŵãµÄ³ö¿ÚdevµÄmacµØÖ·±»¶à¸öpc¹²Ïí
+ unsigned long conn_alloc; //connÉêÇë´ÎÊýÀÛ¼ÓÖµ
+ unsigned long conn_free; //connÊͷŵãÀÛ¼ÓÖµ
+ unsigned long brfdb_alloc; //ÇŵãÉêÇë´ÎÊýÀÛ¼ÓÖµ
+ unsigned long dst_alloc; //dst_entryÉêÇëÀÛ¼ÓÖµ
+ unsigned long dst_free; //dst_entryÊͷŵãÀÛ¼ÓÖµ
+ unsigned long hh_update; //hh¶þ²ãmacÍ·¸üÐÂÀÛ¼ÓÖµ
+ unsigned long rt_cache_invalid; //Çå¿Õ·ÓÉcacheµÄÀÛ¼ÓÖµ
+ unsigned long rt_hash_add; //ÐÂÔört_hash_table½ÚµãµÄÀÛ¼ÓÖµ
+ unsigned long rt_hash_del; //ɾ³ýrt_hash_table½ÚµãµÄÀÛ¼ÓÖµ
+ unsigned long ssmac_change_indev; //ͬһԴMACµØÖ·Èë¿Údev¸Ä±äµÄ´ÎÊý
+};
+
+/************************* SKBÏà¹ØÐÅÏ¢£¬°üÀ¨Í³¼ÆÐÅÏ¢ºÍfastÐÅÏ¢ ***********************/
+struct skb_and_fast_msg
+{
+ int skb_num4; //½ÓÊÕµ½µÄV4Êý¾Ý°ü
+ int skb_num6; //½ÓÊÕµ½µÄV6Êý¾Ý°ü
+ int skb_big_num; //len³¤¶È³¬¹ý1000µÄÊý¾Ý°ü£¬º¬V4ºÍV6
+ int skb_small_num; //len³¤¶ÈСÓÚ100µÄÊý¾Ý°ü£¬º¬V4ºÍV6
+ int skb_bytes4; //½ÓÊÕµ½µÄV4Êý¾Ý°ü×Ö½ÚÊý
+ int skb_bytes6; //½ÓÊÕµ½µÄV6Êý¾Ý°ü×Ö½ÚÊý
+ int skb_unknown; //½ÓÊÕµ½µÄδ֪ÐÒéÊý¾Ý°ü£¬°üÀ¨ARPµÈ·ÇV4ºÍV6µÄ±¨ÎÄ
+ int skb_tcpnum; //½ÓÊÕµ½µÄtcpÊý¾Ý°ü£¬º¬V4ºÍV6£¬µ«²»º¬fastbrµÄ±¨ÎÄ
+ int skb_udpnum; //½ÓÊÕµ½µÄudpÊý¾Ý°ü£¬º¬V4ºÍV6£¬µ«²»º¬fastbrµÄ±¨ÎÄ
+ int broadcast_num4; //½ÓÊÕµ½µÄV4¹ã²¥°ü
+ int broadcast_num6; //½ÓÊÕµ½µÄV6¹ã²¥°ü
+ int multicast_num4; //½ÓÊÕµ½µÄV4×é²¥±¨
+ int multicast_num6; //½ÓÊÕµ½µÄV6×é²¥±¨
+ int fastnat_num; //fastnat³É¹¦µÄ±¨ÎÄ
+ int fast6_num; //fast6³É¹¦µÄ±¨ÎÄ
+ int fastbr_num; //fastbr³É¹¦µÄ±¨ÎÄ
+ int fastnat_level; //²Î¿´FAST_NET_DEVICE
+ int fastbr_level; //²¼¶ûÀàÐÍ
+ //ÏÂÃæ¼¸¸öֵΪÀÛ¼ÓÖµ£¬ÐÔÄÜÏà¹Ø
+ int irqfree_num; //ͨ¹ýÈíÖжÏÊͷŵÄskb£¬ÐÔÄÜÏà¹Ø
+ int skbcopy_num; //Êý¾Ý¿½±´µÄskb£¬ÐÔÄÜÏà¹Ø
+ int cache_copy; //net_cacheÔ´Îļþ½øÐп½±´µÄÀÛ»ý¼ÆÊý£¬ÐÔÄÜÏà¹Ø
+ int skbflood_num; //·ººéµÄskb£¬ÐÔÄÜÏà¹Ø
+ int errfree_num; //devÔ´ÎļþÖдíÎóÊͷŵÄskb¼ÆÊý£¬°üÀ¨SKB_QUEUE_STOPºÍSKB_QUEUE_LOCKÁ½¸ö¼ÆÊýÖµ
+ int frag_num; //½ÓÊÕµ½µÄ·ÖƬ±¨ÎÄ£¬ÐÔÄÜÏà¹Ø
+ int mtu_num; //fastÖÐÊý¾Ý³¤¶È´óÓÚ³ö¿Údev MTUʱ£¬fastʧ°Ü¸öÊýͳ¼Æ
+ int fast_loop; //ͶµÝ¸øÇý¶¯£¬ÓÖ´ÓÇý¶¯ÊÕµ½µÄÒì³£»Ø»·¸öÊýͳ¼Æ
+ int skb_alloc_fail ; //ÉêÇëskbʧ°ÜµÄ¸öÊýÀÛ¼ÓÖµ
+ int xmit_lock_num; //xmit_lock_owner±»Ëø×¡Ôì³ÉµÄ¶ª°üµÄÀÛ¼Ó¼ÆÊý£¬Çý¶¯Ôì³ÉµÄ
+ int xmit_stop_num; //!netif_xmit_stopped(txq)Ôì³ÉµÄ¶ª°üµÄÀÛ¼Ó¼ÆÊý£¬Çý¶¯Ôì³ÉµÄ
+ int br_mac_change_num; //ÍøÇÅmacµØÖ·±»¸Ä±ä´ÎÊý
+ int fast_tcpdump_num; //fast×¥°ü¸öÊý
+ int fast_switch;
+ int fast_local4_rcv_num; //±¾µØfast_local4³É¹¦½ÓÊÕ±¨ÎÄ
+ int fast_local6_rcv_num; //±¾µØfast_local6³É¹¦½ÓÊÕ±¨ÎÄ
+ int fast_local4_output_num; //±¾µØfast_local4³É¹¦·¢Ëͱ¨ÎÄ
+ int fast_local6_output_num; //±¾µØfast_local6³É¹¦·¢Ëͱ¨ÎÄ
+};
+
+struct skb_using_msg
+{
+ unsigned long skb_all;
+ unsigned long skb_tocp;
+ unsigned long skb_fromcp;
+ unsigned long skb_data_num;
+ unsigned long skb_data_size;
+ unsigned long skb_stop;
+ unsigned long skb_lock;
+ unsigned long skb_panic;
+ unsigned long skb_fail;
+};
+
+/************************* ½á¹¹Ì嶨Òå DEV ***********************/
+//ÍøÂçÌí¼Ó£¬Í³¼ÆÍøÂç²ãÃæÊÕ·¢°üÇé¿ö
+struct net_dev_skbinfo {
+ unsigned long rx_packets; //Çý¶¯·¢ËÍÀ´µÄÊý¾Ý°ü¸öÊý£¬ÔÚnetif_rxÍ·ÀÛ¼Ó
+ unsigned long tx_packets; //·¢Ë͸øÇý¶¯µÄÊý¾Ý°ü¸öÊý£¬ÔÚdev_queue_xmitÍ·ÀÛ¼Ó
+ unsigned long rx_bytes; //×Ö½ÚÊý
+ unsigned long tx_bytes; //×Ö½ÚÊý
+ unsigned long rx_dropped; //netif_rxÄÚ²¿Á÷³ÌÖÐËùÓÐÒì³£ÊÍ·ÅskbµÄÀÛ¼Ó£¬Èç´ïµ½netdev_max_backlogÈë¶ÓÁÐÉÏÏÞ¶ø¶ª°ü
+ unsigned long tx_dropped; //dev_queue_xmitÄÚ²¿Á÷³ÌÖÐËùÓÐÒì³£ÊÍ·ÅskbµÄÀÛ¼Ó£¬Èç(txq->xmit_lock_owner == cpu)Ôì³ÉµÄ¶ª°ü
+};
+
+//ÍøÂçÌí¼Ó£¬connÊÕ·¢°üÇé¿ö
+struct conn_skbinfo {
+ unsigned long packets; //Êý¾Ý°ü¸öÊý
+ unsigned long bytes; //×Ö½ÚÊý
+};
+
+/* ¸Ã½á¹¹ÌåÖеÄËùÓÐÐÅÏ¢½ÔÓÉÇý¶¯¸³Öµ£¬ÍøÂç×é²»»á¸³Öµ */
+//Õâ¸ö½á¹¹Ì屨ÐëºÍ <linux/netdevice.h>ÖеÄnet_device_stats±£³ÖÒ»ÖÂ
+struct net_dev_stats {
+ unsigned long rx_packets;
+ unsigned long tx_packets;
+ unsigned long rx_bytes;
+ unsigned long tx_bytes;
+ unsigned long rx_errors; //Ðè¼à¿Ø
+ unsigned long tx_errors; //Ðè¼à¿Ø
+ unsigned long rx_dropped; //Ðè¼à¿Ø
+ unsigned long tx_dropped; //Ðè¼à¿Ø
+ unsigned long multicast;
+ unsigned long collisions;
+ unsigned long rx_length_errors; //Ðè¼à¿Ø
+ unsigned long rx_over_errors; //Ðè¼à¿Ø
+ unsigned long rx_crc_errors; //Ðè¼à¿Ø
+ unsigned long rx_frame_errors; //Ðè¼à¿Ø
+ unsigned long rx_fifo_errors; //Ðè¼à¿Ø
+ unsigned long rx_missed_errors; //Ðè¼à¿Ø
+ unsigned long tx_aborted_errors; //Ðè¼à¿Ø
+ unsigned long tx_carrier_errors; //Ðè¼à¿Ø
+ unsigned long tx_fifo_errors; //Ðè¼à¿Ø
+ unsigned long tx_heartbeat_errors; //Ðè¼à¿Ø
+ unsigned long tx_window_errors; //Ðè¼à¿Ø
+ unsigned long rx_compressed;
+ unsigned long tx_compressed;
+};
+
+struct ioctl_dev_netstats
+{
+ char dev_name[20];
+ struct net_dev_skbinfo stats_dbg; //ÍøÂçÌí¼ÓµÄ£¬Í³¼ÆÍøÂç²ãÃæÊÕ·¢°üÇé¿ö
+ struct net_dev_stats stats; //Êý¾ÝÊÕ·¢Í³¼ÆÖµ£¬¸Ãֵȫ²¿ÓÉÇý¶¯¸³ÖµµÄ£¬ÍøÂç²»¸³Öµ
+ unsigned int flags; //IFF_UPµÈ
+ unsigned char operstate; //ĿǰûɶÓÃ
+ unsigned long state; //µ×²ãÇý¶¯×´Ì¬£¬__LINK_STATE_NOCARRIER
+ int net_flag; //Óû§ifconfigµÄ½á¹û״̬£¬ÈçDEV_OPEN_FAIL
+ unsigned long que_state; //¶ÓÁÐ״̬£¬¶ÔÓ¦ dev->_tx[0].state£¬Èç__QUEUE_STATE_DRV_XOFF
+ unsigned int num_tx_queues; //TX¶ÓÁÐÊýÁ¿£¬¶àÊýÇý¶¯Ê¹ÓÃΨһ¶ÓÁУ¬ÔòֵΪ1
+};
+
+
+/************************* ½á¹¹Ì嶨Òå OTHER ***********************/
+struct pc_info
+{
+ unsigned char mac_addr[6];
+ char dev_name[DEV_NAME_LEN];
+};
+
+struct pc_node
+{
+ unsigned int num;
+ struct pc_info info[PC_MAX_NUM];
+};
+
+struct leak_info
+{
+ void *addr;
+ int user_num; //µ±Ç°data»òskb±»Ê¹ÓõļÆÊýÖµ£¬°éËæskbÖеÄusersºÍdataref¶ø±ä»¯
+ int track_num; //¼Ç¼ÒѼǼµ½Êý×é¹ì¼£µÄϱêË÷Òý
+ char func_track[10][100];//º¯Êý»ØËݹ켣
+};
+
+struct slab_info
+{
+ int num[SLAB_NUM][2];
+};
+
+
+struct hash_info
+{
+ int max_hash_size;
+ int current_hash_num;
+ int hash[HASH_ARRAY_COUNT][2];
+ int current_array_size;
+};
+
+struct ptype_info
+{
+ unsigned long ptype_all[5];
+ unsigned long ptype_base[15];
+};
+
+struct pkt_lost_stats
+{
+ unsigned int send_drops;
+ unsigned int send_drop_bytes;
+ unsigned int recv_drops;
+ unsigned int recv_drop_bytes;
+ unsigned int total_packets;
+ unsigned int total_bytes;
+};
+
+struct pkt_lost_info
+{
+ struct pkt_lost_stats stats[2];
+};
+
+typedef struct
+{
+ char usb[DEV_NAME_LEN_20];
+ char ps[DEV_NAME_LEN_20];
+ char wifi_wan[DEV_NAME_LEN_20];
+ char wifi_lan[DEV_NAME_LEN_20];
+ char eth_wan[DEV_NAME_LEN_20];
+ char eth_lan[DEV_NAME_LEN_20];
+ char ps_ext1[DEV_NAME_LEN_20];
+ char ps_ext2[DEV_NAME_LEN_20];
+ char ps_ext3[DEV_NAME_LEN_20];
+ char ps_ext4[DEV_NAME_LEN_20];
+} net_dbg_dev_info_t;
+
+struct time_list{
+ struct timeval tv;
+ struct list_head packet_list;
+};
+
+struct net_debug_packet_list{
+ struct list_head list;
+ struct list_head time;
+ int pid;
+ int tgid;
+ char pname[DEV_NAME_LEN];
+ int count;
+};
+
+/******************************±äÁ¿ÉùÃ÷***********************/
+/******************************±äÁ¿ÉùÃ÷***********************/
+/******************************±äÁ¿ÉùÃ÷***********************/
+extern int leak_set; // 1±íʾ¸ú×Ùskb¼°dataÉêÇëÊͷŵ㣻2±íʾ¸ú×Ùusers£¬ÒÔ¼ì²âΪºÎskbʼÖÕ²»ÄÜÊÍ·Å£¬ÔÝʱ¸Ã¹¦ÄÜÉв»¿ÉÓÃ
+extern int leak_list_max; // ÈÝÐí»º´æµÄ´ýÊͷŵÄskb¼°dataµÄ¸öÊý£¬¿Éµ÷Õû£»
+extern int track_max; //¹ì¼£¸ú×ÙÊý×éµÄÉÏÏÞ£¬½öµ±user++--ʱ²ÅÐèÒªÀ©´ó£¬·ñÔò2¼´¿É£»
+extern int stack_lenmax; //Õ»º¯Êý¹ì¼£µÄ×Ö·û¸öÊýÉÏÏÞ£»
+extern int leak_full_panic;
+extern unsigned long now_time; //µ±Ç°Ê±¿Ìµã
+extern spinlock_t leak_lock; //·ÀÖ¹ÔÚbhÖб»µ÷Óã¬Ê¹ÓÃbhËø
+
+
+extern struct leak_list data_leak[TRACK_END];
+extern struct leak_list data_free[TRACK_END];//·Ö±ð¶ÔÓ¦ÕýÔÚʹÓõÄÊý¾ÝºÍÒѾÊͷŵÄÊý¾ÝÁ´±í
+extern void *data_head[TRACK_END];//ÿ¸öÄÚ´æ¼à¿ØÀàÐ͵ijõʼ»¯Ê×µØÖ·£¬È·±£Á´±íµÄÊý¾ÝÇøÁ¬Ðø£¬ÒÔ±ãramdumpʱֱ½ÓËÑË÷
+extern int init_finish ;//Á´±í³õʼ»¯±êÖ¾
+
+/*dump stkÓõ½µÄÏà¹Ø±äÁ¿*/
+extern unsigned int skb_dump_len;
+extern char skb_dump_str[];
+
+/*ºË¼äÖØ¸´Êͷżì²â¿ª¹Ø*/
+extern int set_psbufleak ;
+extern int set_extskbleak ;
+
+extern unsigned long skbinfo_dbg[SKB_INFO_MAX];
+extern unsigned long netruninfo_dbg[NET_INFO_MAX];
+extern unsigned char br_ipchange_flag; //br0 ip´Û¸Ä¶ÏÑÔ
+extern int set_tcpdump; //¶¨µã×¥°ü¿ª¹Ø
+
+extern unsigned char ignoremac[ETH_ALEN];
+
+/*¶Ô±¾µØTCP½øÐÐÏà¹ØÍ³¼Æ*/
+extern unsigned long tcp_stats_dbg[TCP_STATS_MAX];
+
+extern char br_name[];
+extern char ps_name[];
+extern char usb_name[];
+extern char ppp_name[];
+
+
+//sqÌí¼Ó£¬ÓÃÓÚÊý¾Ý°ü½¨Ä£ÒÔ¼°ÐÔÄÜͳ¼ÆÏà¹Ø£¬net_info_numÈ«¾ÖÖÐÐÔÄÜÏà¹ØµÄͳ¼ÆÒ²ÐèÌåÏÖ
+extern int skb_num4; //½ÓÊÕµ½µÄV4Êý¾Ý°ü
+extern int skb_num6; //½ÓÊÕµ½µÄV6Êý¾Ý°ü
+extern int skb_big_num; //len³¤¶È³¬¹ý1000µÄÊý¾Ý°ü£¬º¬V4ºÍV6
+extern int skb_small_num; //len³¤¶ÈСÓÚ100µÄÊý¾Ý°ü£¬º¬V4ºÍV6
+extern int skb_bytes4; //½ÓÊÕµ½µÄV4Êý¾Ý°ü×Ö½ÚÊý
+extern int skb_bytes6; //½ÓÊÕµ½µÄV6Êý¾Ý°ü×Ö½ÚÊý
+extern int skb_unknown; //½ÓÊÕµ½µÄδ֪ÐÒéÊý¾Ý°ü£¬°üÀ¨ARP
+extern int skb_tcpnum; //½ÓÊÕµ½µÄtcpÊý¾Ý°ü£¬º¬V4ºÍV6
+extern int skb_udpnum; //½ÓÊÕµ½µÄudpÊý¾Ý°ü£¬º¬V4ºÍV6
+extern int broadcast_num4; //½ÓÊÕµ½µÄV4¹ã²¥°ü
+extern int broadcast_num6; //½ÓÊÕµ½µÄV6¹ã²¥°ü
+extern int multicast_num4; //½ÓÊÕµ½µÄV4×é²¥±¨
+extern int multicast_num6; //½ÓÊÕµ½µÄV6×é²¥±¨
+extern int fastnat_num; //fastnat³É¹¦µÄ±¨ÎÄ
+extern int fast6_num; //fast6³É¹¦µÄ±¨ÎÄ
+extern int fastbr_num; //fastbr³É¹¦µÄ±¨ÎÄ
+extern int fast_local4_rcv_num; //±¾µØfast_local4³É¹¦½ÓÊÕ±¨ÎÄ
+extern int fast_local6_rcv_num; //±¾µØfast_local6³É¹¦½ÓÊÕ±¨ÎÄ
+extern int fast_local4_output_num; //±¾µØfast_local4³É¹¦·¢Ëͱ¨ÎÄ
+extern int fast_local6_output_num; //±¾µØfast_local6³É¹¦·¢Ëͱ¨ÎÄ
+extern int fast_tcpdump_num; //fast×¥°üÊýÁ¿
+
+extern int double_mac;
+
+extern int net_debug_ping; //×ÔÑÐping°ü¼Ç¼¶ª°üʱÑÓ¹¦ÄÜ
+extern int net_debug_perf; //×ÔÑÐtcp/udp°ü¼Ç¼¶ª°üʱÑÓ¹¦ÄÜ£¬ÐèÒªserver¶ÎÄܰ²×°×ÔÑÐÓ¦ÓÃ
+
+//slabÄÚ´æÊ¹ÓÃÏà¹ØÍ³¼Æ£¬Î´¿¼ÂÇͨÓÃslabµØÖ·³Ø£¬Èçkmalloc
+extern struct slab_info slab_count;
+
+//·¢Ë͸øCP´¦ÀíµÄ£¬´ýÊͷŵÄskbÁ´±í£¬ÓÃÓÚlog¸ú×Ù£¬·ÀÖ¹ºË¼äÄÚ´æÐ¹Â©£»
+extern struct ext_list toCp_listlog[MAX_EXT_MEM_HASH];
+
+//CP·¢Ë͸øAPµÄpsbufÐÅÏ¢Á´±í£¬ÓÃÓÚlog¸ú×Ù£¬·ÀÖ¹ºË¼äÄÚ´æÐ¹Â©;
+extern struct ext_list fromCp_list[MAX_EXT_MEM_HASH];
+
+/*½øÐÐTCPͳ¼Æ*/
+#define TCP_PKT_STATS_INC(_mod) tcp_stats_dbg[_mod]++
+
+
+/******************************Íⲿ½Ó¿ÚÉùÃ÷***********************/
+/******************************Íⲿ½Ó¿ÚÉùÃ÷***********************/
+/******************************Íⲿ½Ó¿ÚÉùÃ÷***********************/
+extern void skbinfo_add(unsigned char *addr,unsigned int skb_type);
+extern void skbinfo_del(unsigned char *addr,unsigned int skb_type);
+extern void netruninfo_add(unsigned char *addr,unsigned int info_type);
+extern void netruninfo_del(unsigned char *addr,unsigned int info_type);
+
+extern int get_skbcnt(unsigned long arg);
+extern int get_dev_info(unsigned long arg);
+extern int get_skb_using(unsigned long arg);
+extern int network_get_pcmac(unsigned long arg);
+extern int get_kernelparam(unsigned long arg);
+extern int get_slab_info(unsigned long arg);
+extern int get_hash_info(unsigned long arg);
+
+extern int set_fastnat_level(void *arg);
+extern int set_fastbr_level(void *arg);
+extern int set_fast_debug_panic(void *arg);
+extern int set_fast_dev_xmit(void *arg);
+extern int set_ackdrop(void *arg);
+extern int set_dumpflag(void *arg);
+extern int set_skb_dump(unsigned long arg);
+extern int set_print_opt(void *arg);
+extern int set_sq_tcpdump(void *arg);
+extern int set_leak(void *arg);
+extern int set_max(unsigned long arg);
+extern int set_stacklenmax(unsigned long arg);
+extern int set_trackmax(unsigned long arg);
+extern int set_tcpdump_opt(unsigned long arg);
+extern int set_br_name(void *arg);
+extern int set_ps_name(void *arg);
+extern int set_usb_name(void *arg);
+extern int set_ppp_name(void *arg);
+extern int set_brip(unsigned long arg);
+extern int set_kernelparam(unsigned long arg);
+extern int set_errno_procname(void *arg);
+extern int get_neigh_ip(unsigned long arg);
+extern int get_skb_fast(unsigned long arg);
+extern int get_max_msg(unsigned long arg);
+extern int get_ptype(unsigned long arg);
+extern int get_process_info(void *arg);
+extern void netslab_inc(int i);
+extern void netslab_dec(int i);
+extern void track_netlink(struct sk_buff *skb,u32 group);
+//extern void record_app_atcive_net();
+
+int get_pkt_lost_info(unsigned long arg);
+
+int get_tcp_stat_info(unsigned long arg);
+
+#endif //end _NETIO_FASTINFO_H_
+
+
diff --git a/upstream/linux-5.10/include/net/netfilter/nf_conntrack.h b/upstream/linux-5.10/include/net/netfilter/nf_conntrack.h
new file mode 100755
index 0000000..04ab917
--- /dev/null
+++ b/upstream/linux-5.10/include/net/netfilter/nf_conntrack.h
@@ -0,0 +1,368 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Connection state tracking for netfilter. This is separated from,
+ * but required by, the (future) NAT layer; it can also be used by an iptables
+ * extension.
+ *
+ * 16 Dec 2003: Yasuyuki Kozakai @USAGI <yasuyuki.kozakai@toshiba.co.jp>
+ * - generalize L3 protocol dependent part.
+ *
+ * Derived from include/linux/netfiter_ipv4/ip_conntrack.h
+ */
+
+#ifndef _NF_CONNTRACK_H
+#define _NF_CONNTRACK_H
+
+#include <linux/bitops.h>
+#include <linux/compiler.h>
+
+#include <linux/netfilter/nf_conntrack_common.h>
+#include <linux/netfilter/nf_conntrack_tcp.h>
+#include <linux/netfilter/nf_conntrack_dccp.h>
+#include <linux/netfilter/nf_conntrack_sctp.h>
+#include <linux/netfilter/nf_conntrack_proto_gre.h>
+#include <net/SI/netioc_proc.h>
+
+#include <net/netfilter/nf_conntrack_tuple.h>
+#ifdef CONFIG_FASTNAT_MODULE
+#include <net/SI/pkt_lost_track.h>
+#endif
+
+
+
+struct nf_ct_udp {
+ unsigned long stream_ts;
+};
+
+/* per conntrack: protocol private data */
+union nf_conntrack_proto {
+ /* insert conntrack proto private data here */
+ struct nf_ct_dccp dccp;
+ struct ip_ct_sctp sctp;
+ struct ip_ct_tcp tcp;
+ struct nf_ct_udp udp;
+ struct nf_ct_gre gre;
+ unsigned int tmpl_padto;
+};
+
+union nf_conntrack_expect_proto {
+ /* insert expect proto private data here */
+};
+
+struct nf_conntrack_net {
+ unsigned int users4;
+ unsigned int users6;
+ unsigned int users_bridge;
+};
+
+#include <linux/types.h>
+#include <linux/skbuff.h>
+
+#include <net/netfilter/ipv4/nf_conntrack_ipv4.h>
+#include <net/netfilter/ipv6/nf_conntrack_ipv6.h>
+#ifdef CONFIG_FASTNAT_MODULE
+struct fast_ct_ext{
+ union {
+ struct {
+ struct dst_entry __rcu *fast_dst[IP_CT_DIR_MAX];
+ struct net_device __rcu *fast_brport[IP_CT_DIR_MAX];
+ };
+ struct sock __rcu *sk;
+ };
+ unsigned char isFast;
+};
+#endif
+
+struct nf_conn {
+ /* Usage count in here is 1 for hash table, 1 per skb,
+ * plus 1 for any connection(s) we are `master' for
+ *
+ * Hint, SKB address this struct and refcnt via skb->_nfct and
+ * helpers nf_conntrack_get() and nf_conntrack_put().
+ * Helper nf_ct_put() equals nf_conntrack_put() by dec refcnt,
+ * beware nf_ct_get() is different and don't inc refcnt.
+ */
+ struct nf_conntrack ct_general;
+
+ spinlock_t lock;
+ /* jiffies32 when this ct is considered dead */
+ u32 timeout;
+
+#ifdef CONFIG_NF_CONNTRACK_ZONES
+ struct nf_conntrack_zone zone;
+#endif
+ /* XXX should I move this to the tail ? - Y.K */
+ /* These are my tuples; original and reply */
+ struct nf_conntrack_tuple_hash tuplehash[IP_CT_DIR_MAX];
+
+ /* Have we seen traffic both ways yet? (bitset) */
+ unsigned long status;
+
+ u16 cpu;
+ possible_net_t ct_net;
+
+#if IS_ENABLED(CONFIG_NF_NAT)
+ struct hlist_node nat_bysource;
+#endif
+ /* all members below initialized via memset */
+ struct { } __nfct_init_offset;
+
+ /* If we were expected by an expectation, this will be it */
+ struct nf_conn *master;
+
+#if defined(CONFIG_NF_CONNTRACK_MARK)
+ u_int32_t mark;
+#endif
+
+#ifdef CONFIG_NF_CONNTRACK_SECMARK
+ u_int32_t secmark;
+#endif
+
+ /* Extensions */
+ struct nf_ct_ext *ext;
+
+ /* Storage reserved for other modules, must be the last member */
+ union nf_conntrack_proto proto;
+#ifdef CONFIG_FASTNAT_MODULE
+ struct fast_ct_ext fast_ct;
+ struct conn_seq_track conn_pktloss[IP_CT_DIR_MAX];
+#endif
+
+ struct conn_skbinfo packet_info[IP_CT_DIR_MAX];
+ struct net_device* indev[IP_CT_DIR_MAX];
+ struct net_device* outdev[IP_CT_DIR_MAX];
+};
+
+static inline struct nf_conn *
+nf_ct_tuplehash_to_ctrack(const struct nf_conntrack_tuple_hash *hash)
+{
+ return container_of(hash, struct nf_conn,
+ tuplehash[hash->tuple.dst.dir]);
+}
+
+static inline u_int16_t nf_ct_l3num(const struct nf_conn *ct)
+{
+ return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num;
+}
+
+static inline u_int8_t nf_ct_protonum(const struct nf_conn *ct)
+{
+ return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum;
+}
+
+#define nf_ct_tuple(ct, dir) (&(ct)->tuplehash[dir].tuple)
+
+/* get master conntrack via master expectation */
+#define master_ct(conntr) (conntr->master)
+
+extern struct net init_net;
+
+static inline struct net *nf_ct_net(const struct nf_conn *ct)
+{
+ return read_pnet(&ct->ct_net);
+}
+
+/* Alter reply tuple (maybe alter helper). */
+void nf_conntrack_alter_reply(struct nf_conn *ct,
+ const struct nf_conntrack_tuple *newreply);
+
+/* Is this tuple taken? (ignoring any belonging to the given
+ conntrack). */
+int nf_conntrack_tuple_taken(const struct nf_conntrack_tuple *tuple,
+ const struct nf_conn *ignored_conntrack);
+
+/* Return conntrack_info and tuple hash for given skb. */
+static inline struct nf_conn *
+nf_ct_get(const struct sk_buff *skb, enum ip_conntrack_info *ctinfo)
+{
+ unsigned long nfct = skb_get_nfct(skb);
+
+ *ctinfo = nfct & NFCT_INFOMASK;
+ return (struct nf_conn *)(nfct & NFCT_PTRMASK);
+}
+
+/* decrement reference count on a conntrack */
+static inline void nf_ct_put(struct nf_conn *ct)
+{
+ WARN_ON(!ct);
+ nf_conntrack_put(&ct->ct_general);
+}
+
+/* Protocol module loading */
+int nf_ct_l3proto_try_module_get(unsigned short l3proto);
+void nf_ct_l3proto_module_put(unsigned short l3proto);
+
+/* load module; enable/disable conntrack in this namespace */
+int nf_ct_netns_get(struct net *net, u8 nfproto);
+void nf_ct_netns_put(struct net *net, u8 nfproto);
+
+/*
+ * Allocate a hashtable of hlist_head (if nulls == 0),
+ * or hlist_nulls_head (if nulls == 1)
+ */
+void *nf_ct_alloc_hashtable(unsigned int *sizep, int nulls);
+
+void nf_ct_free_hashtable(void *hash, unsigned int size);
+int nf_conntrack_hash_check_insert(struct nf_conn *ct);
+bool nf_ct_delete(struct nf_conn *ct, u32 pid, int report);
+
+bool nf_ct_get_tuplepr(const struct sk_buff *skb, unsigned int nhoff,
+ u_int16_t l3num, struct net *net,
+ struct nf_conntrack_tuple *tuple);
+
+void __nf_ct_refresh_acct(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
+ const struct sk_buff *skb,
+ u32 extra_jiffies, bool do_acct);
+
+/* Refresh conntrack for this many jiffies and do accounting */
+static inline void nf_ct_refresh_acct(struct nf_conn *ct,
+ enum ip_conntrack_info ctinfo,
+ const struct sk_buff *skb,
+ u32 extra_jiffies)
+{
+ __nf_ct_refresh_acct(ct, ctinfo, skb, extra_jiffies, true);
+}
+
+/* Refresh conntrack for this many jiffies */
+static inline void nf_ct_refresh(struct nf_conn *ct,
+ const struct sk_buff *skb,
+ u32 extra_jiffies)
+{
+ __nf_ct_refresh_acct(ct, 0, skb, extra_jiffies, false);
+}
+
+/* kill conntrack and do accounting */
+bool nf_ct_kill_acct(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
+ const struct sk_buff *skb);
+
+/* kill conntrack without accounting */
+static inline bool nf_ct_kill(struct nf_conn *ct)
+{
+ return nf_ct_delete(ct, 0, 0);
+}
+
+/* Set all unconfirmed conntrack as dying */
+void nf_ct_unconfirmed_destroy(struct net *);
+
+/* Iterate over all conntracks: if iter returns true, it's deleted. */
+void nf_ct_iterate_cleanup_net(struct net *net,
+ int (*iter)(struct nf_conn *i, void *data),
+ void *data, u32 portid, int report);
+
+/* also set unconfirmed conntracks as dying. Only use in module exit path. */
+void nf_ct_iterate_destroy(int (*iter)(struct nf_conn *i, void *data),
+ void *data);
+
+struct nf_conntrack_zone;
+
+void nf_conntrack_free(struct nf_conn *ct);
+struct nf_conn *nf_conntrack_alloc(struct net *net,
+ const struct nf_conntrack_zone *zone,
+ const struct nf_conntrack_tuple *orig,
+ const struct nf_conntrack_tuple *repl,
+ gfp_t gfp);
+
+static inline int nf_ct_is_template(const struct nf_conn *ct)
+{
+ return test_bit(IPS_TEMPLATE_BIT, &ct->status);
+}
+
+/* It's confirmed if it is, or has been in the hash table. */
+static inline int nf_ct_is_confirmed(const struct nf_conn *ct)
+{
+ return test_bit(IPS_CONFIRMED_BIT, &ct->status);
+}
+
+static inline int nf_ct_is_dying(const struct nf_conn *ct)
+{
+ return test_bit(IPS_DYING_BIT, &ct->status);
+}
+
+/* Packet is received from loopback */
+static inline bool nf_is_loopback_packet(const struct sk_buff *skb)
+{
+ return skb->dev && skb->skb_iif && skb->dev->flags & IFF_LOOPBACK;
+}
+
+#define nfct_time_stamp ((u32)(jiffies))
+
+/* jiffies until ct expires, 0 if already expired */
+static inline unsigned long nf_ct_expires(const struct nf_conn *ct)
+{
+ s32 timeout = READ_ONCE(ct->timeout) - nfct_time_stamp;
+
+ return timeout > 0 ? timeout : 0;
+}
+
+static inline bool nf_ct_is_expired(const struct nf_conn *ct)
+{
+ return (__s32)(READ_ONCE(ct->timeout) - nfct_time_stamp) <= 0;
+}
+
+/* use after obtaining a reference count */
+static inline bool nf_ct_should_gc(const struct nf_conn *ct)
+{
+ return nf_ct_is_expired(ct) && nf_ct_is_confirmed(ct) &&
+ !nf_ct_is_dying(ct);
+}
+
+#define NF_CT_DAY (86400 * HZ)
+
+/* Set an arbitrary timeout large enough not to ever expire, this save
+ * us a check for the IPS_OFFLOAD_BIT from the packet path via
+ * nf_ct_is_expired().
+ */
+static inline void nf_ct_offload_timeout(struct nf_conn *ct)
+{
+ if (nf_ct_expires(ct) < NF_CT_DAY / 2)
+ WRITE_ONCE(ct->timeout, nfct_time_stamp + NF_CT_DAY);
+}
+
+struct kernel_param;
+
+int nf_conntrack_set_hashsize(const char *val, const struct kernel_param *kp);
+int nf_conntrack_hash_resize(unsigned int hashsize);
+
+extern struct hlist_nulls_head *nf_conntrack_hash;
+extern unsigned int nf_conntrack_htable_size;
+extern seqcount_spinlock_t nf_conntrack_generation;
+extern unsigned int nf_conntrack_max;
+
+/* must be called with rcu read lock held */
+static inline void
+nf_conntrack_get_ht(struct hlist_nulls_head **hash, unsigned int *hsize)
+{
+ struct hlist_nulls_head *hptr;
+ unsigned int sequence, hsz;
+
+ do {
+ sequence = read_seqcount_begin(&nf_conntrack_generation);
+ hsz = nf_conntrack_htable_size;
+ hptr = nf_conntrack_hash;
+ } while (read_seqcount_retry(&nf_conntrack_generation, sequence));
+
+ *hash = hptr;
+ *hsize = hsz;
+}
+
+struct nf_conn *nf_ct_tmpl_alloc(struct net *net,
+ const struct nf_conntrack_zone *zone,
+ gfp_t flags);
+void nf_ct_tmpl_free(struct nf_conn *tmpl);
+
+u32 nf_ct_get_id(const struct nf_conn *ct);
+
+static inline void
+nf_ct_set(struct sk_buff *skb, struct nf_conn *ct, enum ip_conntrack_info info)
+{
+ skb_set_nfct(skb, (unsigned long)ct | info);
+}
+
+#define NF_CT_STAT_INC(net, count) __this_cpu_inc((net)->ct.stat->count)
+#define NF_CT_STAT_INC_ATOMIC(net, count) this_cpu_inc((net)->ct.stat->count)
+#define NF_CT_STAT_ADD_ATOMIC(net, count, v) this_cpu_add((net)->ct.stat->count, (v))
+
+#define MODULE_ALIAS_NFCT_HELPER(helper) \
+ MODULE_ALIAS("nfct-helper-" helper)
+
+#endif /* _NF_CONNTRACK_H */