if_ether.c (287779) | if_ether.c (287789) |
---|---|
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 287779 2015-09-14 10:28:47Z melifaro $"); | 39__FBSDID("$FreeBSD: head/sys/netinet/if_ether.c 287789 2015-09-14 16:48:19Z melifaro $"); |
40 41#include "opt_inet.h" 42 43#include <sys/param.h> 44#include <sys/kernel.h> 45#include <sys/lock.h> 46#include <sys/queue.h> 47#include <sys/sysctl.h> --- 87 unchanged lines hidden (view full) --- 135 136static const struct netisr_handler arp_nh = { 137 .nh_name = "arp", 138 .nh_handler = arpintr, 139 .nh_proto = NETISR_ARP, 140 .nh_policy = NETISR_POLICY_SOURCE, 141}; 142 | 40 41#include "opt_inet.h" 42 43#include <sys/param.h> 44#include <sys/kernel.h> 45#include <sys/lock.h> 46#include <sys/queue.h> 47#include <sys/sysctl.h> --- 87 unchanged lines hidden (view full) --- 135 136static const struct netisr_handler arp_nh = { 137 .nh_name = "arp", 138 .nh_handler = arpintr, 139 .nh_proto = NETISR_ARP, 140 .nh_policy = NETISR_POLICY_SOURCE, 141}; 142 |
143#ifdef AF_INET | |
144/* | 143/* |
145 * called by in_scrubprefix() to remove entry from the table when 146 * the interface goes away 147 */ 148void 149arp_ifscrub(struct ifnet *ifp, uint32_t addr) 150{ 151 struct sockaddr_in addr4; 152 153 bzero((void *)&addr4, sizeof(addr4)); 154 addr4.sin_len = sizeof(addr4); 155 addr4.sin_family = AF_INET; 156 addr4.sin_addr.s_addr = addr; 157 IF_AFDATA_WLOCK(ifp); 158 lla_delete(LLTABLE(ifp), LLE_IFADDR, (struct sockaddr *)&addr4); 159 IF_AFDATA_WUNLOCK(ifp); 160} 161#endif 162 163/* | |
164 * Timeout routine. Age arp_tab entries periodically. 165 */ 166static void 167arptimer(void *arg) 168{ 169 struct llentry *lle = (struct llentry *)arg; 170 struct ifnet *ifp; 171 --- 1014 unchanged lines hidden --- | 144 * Timeout routine. Age arp_tab entries periodically. 145 */ 146static void 147arptimer(void *arg) 148{ 149 struct llentry *lle = (struct llentry *)arg; 150 struct ifnet *ifp; 151 --- 1014 unchanged lines hidden --- |