From 6923c9623fd958b183741b4d4f8d2cbe4325a144 Mon Sep 17 00:00:00 2001 From: Xavier Simonart Date: Tue, 27 Nov 2018 14:54:49 +0100 Subject: Clean up debugging messages Print IP address in a.b.c.d format instead of one 32-bit number. Better align debugging information in log file Change-Id: Icfab30836ba83d53f700fcfbdfbd7cf238ed7bf8 Signed-off-by: Xavier Simonart --- VNFs/DPPD-PROX/packet_utils.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'VNFs/DPPD-PROX/packet_utils.h') diff --git a/VNFs/DPPD-PROX/packet_utils.h b/VNFs/DPPD-PROX/packet_utils.h index 0017a89e..a58340e2 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,8 @@ #define FLAG_DST_MAC_KNOWN 1 #define MAX_ARP_ENTRIES 65536 +#define IP4(x) x & 0xff, (x >> 8) & 0xff, (x >> 16) & 0xff, x >> 24 + struct task_base; struct task_args; struct arp_table { @@ -52,3 +56,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_ */ -- cgit 1.2.3-korg