Deleted Added
full compact
packet.c (198352) packet.c (249766)
1/* $OpenBSD: packet.c,v 1.9 2004/05/04 18:58:50 deraadt Exp $ */
2
3/* Packet assembly code, originally contributed by Archie Cobbs. */
4
5/*
6 * Copyright (c) 1995, 1996, 1999 The Internet Software Consortium.
7 * All rights reserved.
8 *

--- 27 unchanged lines hidden (view full) ---

36 * This software has been written for the Internet Software Consortium
37 * by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
38 * Enterprises. To learn more about the Internet Software Consortium,
39 * see ``http://www.vix.com/isc''. To learn more about Vixie
40 * Enterprises, see ``http://www.vix.com''.
41 */
42
43#include <sys/cdefs.h>
1/* $OpenBSD: packet.c,v 1.9 2004/05/04 18:58:50 deraadt Exp $ */
2
3/* Packet assembly code, originally contributed by Archie Cobbs. */
4
5/*
6 * Copyright (c) 1995, 1996, 1999 The Internet Software Consortium.
7 * All rights reserved.
8 *

--- 27 unchanged lines hidden (view full) ---

36 * This software has been written for the Internet Software Consortium
37 * by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
38 * Enterprises. To learn more about the Internet Software Consortium,
39 * see ``http://www.vix.com/isc''. To learn more about Vixie
40 * Enterprises, see ``http://www.vix.com''.
41 */
42
43#include <sys/cdefs.h>
44__FBSDID("$FreeBSD: head/sbin/dhclient/packet.c 198352 2009-10-21 23:50:35Z philip $");
44__FBSDID("$FreeBSD: head/sbin/dhclient/packet.c 249766 2013-04-22 15:02:32Z jhb $");
45
46#include "dhcpd.h"
47
48#include <netinet/in_systm.h>
49#include <netinet/ip.h>
50#include <netinet/udp.h>
51#include <netinet/if_ether.h>
52

--- 70 unchanged lines hidden (view full) ---

123 struct udphdr udp;
124
125 ip.ip_v = 4;
126 ip.ip_hl = 5;
127 ip.ip_tos = IPTOS_LOWDELAY;
128 ip.ip_len = htons(sizeof(ip) + sizeof(udp) + len);
129 ip.ip_id = 0;
130 ip.ip_off = 0;
45
46#include "dhcpd.h"
47
48#include <netinet/in_systm.h>
49#include <netinet/ip.h>
50#include <netinet/udp.h>
51#include <netinet/if_ether.h>
52

--- 70 unchanged lines hidden (view full) ---

123 struct udphdr udp;
124
125 ip.ip_v = 4;
126 ip.ip_hl = 5;
127 ip.ip_tos = IPTOS_LOWDELAY;
128 ip.ip_len = htons(sizeof(ip) + sizeof(udp) + len);
129 ip.ip_id = 0;
130 ip.ip_off = 0;
131 ip.ip_ttl = 16;
131 ip.ip_ttl = 128;
132 ip.ip_p = IPPROTO_UDP;
133 ip.ip_sum = 0;
134 ip.ip_src.s_addr = from;
135 ip.ip_dst.s_addr = to;
136
137 ip.ip_sum = wrapsum(checksum((unsigned char *)&ip, sizeof(ip), 0));
138
139 /*

--- 128 unchanged lines hidden ---
132 ip.ip_p = IPPROTO_UDP;
133 ip.ip_sum = 0;
134 ip.ip_src.s_addr = from;
135 ip.ip_dst.s_addr = to;
136
137 ip.ip_sum = wrapsum(checksum((unsigned char *)&ip, sizeof(ip), 0));
138
139 /*

--- 128 unchanged lines hidden ---