projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Put in proper address information for Poul-Henning Kamp.
[unix-history]
/
sys
/
netinet
/
if_ether.c
diff --git
a/sys/netinet/if_ether.c
b/sys/netinet/if_ether.c
index
d4e60a5
..
d517bc4
100644
(file)
--- a/
sys/netinet/if_ether.c
+++ b/
sys/netinet/if_ether.c
@@
-30,7
+30,8
@@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)if_ether.c 7.13 (Berkeley) 10/31/90
+ * from: @(#)if_ether.c 7.13 (Berkeley) 10/31/90
+ * $Id: if_ether.c,v 1.3 1993/10/16 18:25:54 rgrimes Exp $
*/
/*
*/
/*
@@
-59,6
+60,9
@@
#include "ip.h"
#include "if_ether.h"
#include "ip.h"
#include "if_ether.h"
+static void in_arpinput(struct arpcom *, struct mbuf *);
+static void arptfree(struct arptab *);
+
#ifdef GATEWAY
#define ARPTAB_BSIZ 16 /* bucket size */
#define ARPTAB_NB 37 /* number of buckets */
#ifdef GATEWAY
#define ARPTAB_BSIZ 16 /* bucket size */
#define ARPTAB_NB 37 /* number of buckets */
@@
-99,6
+103,7
@@
extern struct ifnet loif;
/*
* Timeout routine. Age arp_tab entries once a minute.
*/
/*
* Timeout routine. Age arp_tab entries once a minute.
*/
+void
arptimer()
{
register struct arptab *at;
arptimer()
{
register struct arptab *at;
@@
-120,6
+125,7
@@
arptimer()
/*
* Broadcast an ARP packet, asking who has addr on interface ac.
*/
/*
* Broadcast an ARP packet, asking who has addr on interface ac.
*/
+void
arpwhohas(ac, addr)
register struct arpcom *ac;
struct in_addr *addr;
arpwhohas(ac, addr)
register struct arpcom *ac;
struct in_addr *addr;
@@
-171,6
+177,7
@@
int useloopback = 1; /* use loopback interface for local traffic */
* arptab is also altered from input interrupt service (ecintr/ilintr
* calls arpinput when ETHERTYPE_ARP packets come in).
*/
* arptab is also altered from input interrupt service (ecintr/ilintr
* calls arpinput when ETHERTYPE_ARP packets come in).
*/
+int
arpresolve(ac, m, destip, desten, usetrailers)
register struct arpcom *ac;
struct mbuf *m;
arpresolve(ac, m, destip, desten, usetrailers)
register struct arpcom *ac;
struct mbuf *m;
@@
-241,8
+248,10
@@
arpresolve(ac, m, destip, desten, usetrailers)
}
at->at_timer = 0; /* restart the timer */
if (at->at_flags & ATF_COM) { /* entry IS complete */
}
at->at_timer = 0; /* restart the timer */
if (at->at_flags & ATF_COM) { /* entry IS complete */
- bcopy((caddr_t)at->at_enaddr, (caddr_t)desten,
- sizeof(at->at_enaddr));
+
+ *(int *) desten = *(int *) at->at_enaddr;
+ ((short *) desten)[2] = ((short *) at->at_enaddr)[2];
+
if (at->at_flags & ATF_USETRAILERS)
*usetrailers = 1;
splx(s);
if (at->at_flags & ATF_USETRAILERS)
*usetrailers = 1;
splx(s);
@@
-267,6
+276,7
@@
arpresolve(ac, m, destip, desten, usetrailers)
* is received. Common length and type checks are done here,
* then the protocol-specific routine is called.
*/
* is received. Common length and type checks are done here,
* then the protocol-specific routine is called.
*/
+void
arpinput(ac, m)
struct arpcom *ac;
struct mbuf *m;
arpinput(ac, m)
struct arpcom *ac;
struct mbuf *m;
@@
-311,13
+321,14
@@
out:
* We reply to requests for ETHERTYPE_TRAIL protocol as well,
* but don't normally send requests.
*/
* We reply to requests for ETHERTYPE_TRAIL protocol as well,
* but don't normally send requests.
*/
+void
in_arpinput(ac, m)
register struct arpcom *ac;
struct mbuf *m;
{
register struct ether_arp *ea;
struct ether_header *eh;
in_arpinput(ac, m)
register struct arpcom *ac;
struct mbuf *m;
{
register struct ether_arp *ea;
struct ether_header *eh;
- register struct arptab *at
;
/* same as "merge" flag */
+ register struct arptab *at
= 0;
/* same as "merge" flag */
register struct in_ifaddr *ia;
struct in_ifaddr *maybe_ia = 0;
struct mbuf *mcopy = 0;
register struct in_ifaddr *ia;
struct in_ifaddr *maybe_ia = 0;
struct mbuf *mcopy = 0;
@@
-466,6
+477,7
@@
out:
/*
* Free an arptab entry.
*/
/*
* Free an arptab entry.
*/
+void
arptfree(at)
register struct arptab *at;
{
arptfree(at)
register struct arptab *at;
{
@@
-521,6
+533,7
@@
out:
return (at);
}
return (at);
}
+int
arpioctl(cmd, data)
int cmd;
caddr_t data;
arpioctl(cmd, data)
int cmd;
caddr_t data;