Deleted Added
full compact
if_ether.c (172467) if_ether.c (173018)
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

31
32/*
33 * Ethernet address resolution protocol.
34 * TODO:
35 * add "inuse/lock" bit (or ref. count) along with valid bit
36 */
37
38#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

31
32/*
33 * Ethernet address resolution protocol.
34 * TODO:
35 * add "inuse/lock" bit (or ref. count) along with valid bit
36 */
37
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/sys/netinet/if_ether.c 172467 2007-10-07 20:44:24Z silby $");
39__FBSDID("$FreeBSD: head/sys/netinet/if_ether.c 173018 2007-10-26 13:18:38Z rwatson $");
40
41#include "opt_inet.h"
42#include "opt_mac.h"
43#include "opt_carp.h"
44
45#include <sys/param.h>
46#include <sys/kernel.h>
47#include <sys/queue.h>

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

318 return;
319 m->m_len = sizeof(*ah) + 2*sizeof(struct in_addr) +
320 2*ifp->if_data.ifi_addrlen;
321 m->m_pkthdr.len = m->m_len;
322 MH_ALIGN(m, m->m_len);
323 ah = mtod(m, struct arphdr *);
324 bzero((caddr_t)ah, m->m_len);
325#ifdef MAC
40
41#include "opt_inet.h"
42#include "opt_mac.h"
43#include "opt_carp.h"
44
45#include <sys/param.h>
46#include <sys/kernel.h>
47#include <sys/queue.h>

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

318 return;
319 m->m_len = sizeof(*ah) + 2*sizeof(struct in_addr) +
320 2*ifp->if_data.ifi_addrlen;
321 m->m_pkthdr.len = m->m_len;
322 MH_ALIGN(m, m->m_len);
323 ah = mtod(m, struct arphdr *);
324 bzero((caddr_t)ah, m->m_len);
325#ifdef MAC
326 mac_create_mbuf_linklayer(ifp, m);
326 mac_mbuf_create_linklayer(ifp, m);
327#endif
328 ah->ar_pro = htons(ETHERTYPE_IP);
329 ah->ar_hln = ifp->if_addrlen; /* hardware address length */
330 ah->ar_pln = sizeof(struct in_addr); /* protocol address length */
331 ah->ar_op = htons(ARPOP_REQUEST);
332 bcopy((caddr_t)enaddr, (caddr_t)ar_sha(ah), ah->ar_hln);
333 bcopy((caddr_t)sip, (caddr_t)ar_spa(ah), ah->ar_pln);
334 bcopy((caddr_t)tip, (caddr_t)ar_tpa(ah), ah->ar_pln);

--- 633 unchanged lines hidden ---
327#endif
328 ah->ar_pro = htons(ETHERTYPE_IP);
329 ah->ar_hln = ifp->if_addrlen; /* hardware address length */
330 ah->ar_pln = sizeof(struct in_addr); /* protocol address length */
331 ah->ar_op = htons(ARPOP_REQUEST);
332 bcopy((caddr_t)enaddr, (caddr_t)ar_sha(ah), ah->ar_hln);
333 bcopy((caddr_t)sip, (caddr_t)ar_spa(ah), ah->ar_pln);
334 bcopy((caddr_t)tip, (caddr_t)ar_tpa(ah), ah->ar_pln);

--- 633 unchanged lines hidden ---