summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/packet_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'VNFs/DPPD-PROX/packet_utils.h')
-rw-r--r--VNFs/DPPD-PROX/packet_utils.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/packet_utils.h b/VNFs/DPPD-PROX/packet_utils.h
index 0017a89e..74a3f60e 100644
--- a/VNFs/DPPD-PROX/packet_utils.h
+++ b/VNFs/DPPD-PROX/packet_utils.h
@@ -13,6 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
*/
+#ifndef _PACKET_UTILS_H_
+#define _PACKET_UTILS_H_
#include "arp.h"
#include "quit.h"
@@ -24,6 +26,14 @@
#define FLAG_DST_MAC_KNOWN 1
#define MAX_ARP_ENTRIES 65536
+#define IP4(x) x & 0xff, (x >> 8) & 0xff, (x >> 16) & 0xff, x >> 24
+enum {
+ SEND_MBUF_AND_ARP,
+ SEND_MBUF,
+ SEND_ARP,
+ DROP_MBUF
+};
+
struct task_base;
struct task_args;
struct arp_table {
@@ -44,6 +54,7 @@ struct l3_base {
struct arp_table optimized_arp_table[4];
struct rte_hash *ip_hash;
struct arp_table *arp_table;
+ struct rte_mempool *arp_pool;
};
void task_init_l3(struct task_base *tbase, struct task_args *targ);
@@ -52,3 +63,5 @@ int write_dst_mac(struct task_base *tbase, struct rte_mbuf *mbuf, uint32_t *ip_d
void task_set_gateway_ip(struct task_base *tbase, uint32_t ip);
void task_set_local_ip(struct task_base *tbase, uint32_t ip);
void handle_ctrl_plane_pkts(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t n_pkts);
+
+#endif /* _PACKET_UTILS_H_ */