From 3b76a8ae22874b76759da9e188082138a9a03d41 Mon Sep 17 00:00:00 2001
From: Alfredo Cardigliano <cardigliano@ntop.org>
Date: Tue, 30 Apr 2024 09:30:24 +0000
Subject: [PATCH] Fix missing prototypes

---
 kernel/pf_ring.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

--- a/kernel/pf_ring.c
+++ b/kernel/pf_ring.c
@@ -443,6 +443,65 @@ MODULE_PARM_DESC(transparent_mode,
 
 /* ********************************** */
 
+u_int32_t get_num_rx_queues(struct net_device *dev);
+u_int32_t lock_rss_queues(struct net_device *dev);
+pf_ring_net *netns_lookup(struct net *net);
+pf_ring_net *netns_add(struct net *net);
+pf_ring_device *pf_ring_device_ifindex_lookup(struct net *net, int ifindex);
+pf_ring_device *pf_ring_device_name_lookup(struct net *net /* namespace */, char *name);
+int check_perfect_rules(struct sk_buff *skb,
+                        struct pf_ring_socket *pfr,
+                        struct pfring_pkthdr *hdr,
+                        int *fwd_pkt,
+                        int displ,
+                        sw_filtering_hash_bucket **p_hash_bucket);
+int check_wildcard_rules(struct sk_buff *skb,
+                         struct pf_ring_socket *pfr,
+                         struct pfring_pkthdr *hdr,
+                         int *fwd_pkt,
+                         int displ);
+int bpf_filter_skb(struct sk_buff *skb,
+                   struct pf_ring_socket *pfr,
+                   int displ);
+int sample_packet(struct pf_ring_socket *pfr);
+u_int32_t default_rehash_rss_func(struct sk_buff *skb, struct pfring_pkthdr *hdr);
+void set_ring_num_channels(struct pf_ring_socket *pfr, u_int32_t num_rx_channels);
+void register_device_handler(void);
+void unregister_device_handler(void);
+void reserve_memory(unsigned long base, unsigned long mem_len);
+void unreserve_memory(unsigned long base, unsigned long mem_len);
+unsigned int ring_poll(struct file *file,
+                       struct socket *sock, poll_table *wait);
+ring_cluster_element *cluster_lookup(u_int32_t cluster_id);
+int get_first_available_cluster_queue(ring_cluster_element *el);
+struct pf_ring_socket *get_first_cluster_consumer(ring_cluster_element *el);
+int add_sock_to_cluster_list(ring_cluster_element *el, struct sock *sk, u_int16_t consumer_id);
+int remove_from_cluster_list(struct ring_cluster *cluster_ptr, struct sock *sock);
+int setSocketStats(struct pf_ring_socket *pfr);
+void pf_ring_zc_dev_register(zc_dev_callbacks *callbacks,
+                             zc_dev_ring_info *rx_info,
+                             zc_dev_ring_info *tx_info,
+                             void *rx_descr_packet_memory,
+                             void *tx_descr_packet_memory,
+                             void *phys_card_memory,
+                             u_int32_t phys_card_memory_len,
+                             u_int32_t channel_id,
+                             struct net_device *dev,
+                             struct device *hwdev,
+                             zc_dev_model device_model,
+                             u_char *device_address,
+                             wait_queue_head_t *packet_waitqueue,
+                             u_int8_t *interrupt_received,
+                             void *rx_adapter,
+                             void *tx_adapter);
+void pf_ring_zc_dev_unregister(struct net_device *dev, u_int32_t channel_id);
+void remove_device_from_proc(pf_ring_net *netns, pf_ring_device *dev_ptr);
+void remove_device_from_ring_list(struct net_device *dev);
+void add_device_to_proc(pf_ring_net *netns, pf_ring_device *dev_ptr);
+int add_device_to_ring_list(struct net_device *dev, int32_t dev_index);
+
+/* ********************************** */
+
 #define MIN_QUEUED_PKTS      64
 #define MAX_QUEUE_LOOPS      64
 
