aboutsummaryrefslogtreecommitdiff
path: root/contrib/ipfilter/lib/printiphdr.c
blob: fdf0f75f907955c9d8ed7e63f4cf236bae4bed04 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Copyright (C)  by Darren Reed.
 *
 * See the IPFILTER.LICENCE file for details on licencing.
 *
 * $Id: printiphdr.c,v 1.1 2009/03/01 12:48:32 darren_r Exp $
 */

#include "ipf.h"


void
printiphdr(ip)
	ip_t *ip;
{
	PRINTF("ip(v=%d,hl=%d,len=%d,tos=%#x,off=%#x,sum=%#x,src=%#x,dst=%#x",
	       ip->ip_v, ip->ip_hl, ntohs(ip->ip_len), ip->ip_tos,
	       ntohs(ip->ip_off), ntohs(ip->ip_sum), ntohl(ip->ip_src.s_addr),
	       ntohl(ip->ip_dst.s_addr));
}