printiphdr.c (41edb306f05651fcaf6c74f9e3557f59f80292e1) | printiphdr.c (efeb8bffe34422937c7f8df836afb5b817366d16) |
---|---|
1/* 2 * Copyright (C) by Darren Reed. 3 * 4 * See the IPFILTER.LICENCE file for details on licencing. 5 * 6 * $Id: printiphdr.c,v 1.1 2009/03/01 12:48:32 darren_r Exp $ 7 */ 8 9#include "ipf.h" 10 11 12void | 1/* 2 * Copyright (C) by Darren Reed. 3 * 4 * See the IPFILTER.LICENCE file for details on licencing. 5 * 6 * $Id: printiphdr.c,v 1.1 2009/03/01 12:48:32 darren_r Exp $ 7 */ 8 9#include "ipf.h" 10 11 12void |
13printiphdr(ip) 14 ip_t *ip; | 13printiphdr(ip_t *ip) |
15{ 16 PRINTF("ip(v=%d,hl=%d,len=%d,tos=%#x,off=%#x,sum=%#x,src=%#x,dst=%#x", 17 ip->ip_v, ip->ip_hl, ntohs(ip->ip_len), ip->ip_tos, 18 ntohs(ip->ip_off), ntohs(ip->ip_sum), ntohl(ip->ip_src.s_addr), 19 ntohl(ip->ip_dst.s_addr)); 20} | 14{ 15 PRINTF("ip(v=%d,hl=%d,len=%d,tos=%#x,off=%#x,sum=%#x,src=%#x,dst=%#x", 16 ip->ip_v, ip->ip_hl, ntohs(ip->ip_len), ip->ip_tos, 17 ntohs(ip->ip_off), ntohs(ip->ip_sum), ntohl(ip->ip_src.s_addr), 18 ntohl(ip->ip_dst.s_addr)); 19} |