root/net/inet/arp.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * INET         An implementation of the TCP/IP protocol suite for the LINUX
   3  *              operating system.  INET is implemented using the  BSD Socket
   4  *              interface as the means of communication with the user level.
   5  *
   6  *              Definitions for the ARP protocol module.
   7  *
   8  * Version:     @(#)arp.h       1.0.6   05/21/93
   9  *
  10  * Authors:     Ross Biro, <bir7@leland.Stanford.Edu>
  11  *              Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  12  *
  13  *              This program is free software; you can redistribute it and/or
  14  *              modify it under the terms of the GNU General Public License
  15  *              as published by the Free Software Foundation; either version
  16  *              2 of the License, or (at your option) any later version.
  17  */
  18 #ifndef _ARP_H
  19 #define _ARP_H
  20 
  21 #define ARP_TABLE_SIZE  16              /* size of ARP table            */
  22 #define ARP_TIMEOUT     30000           /* five minutes                 */
  23 #define ARP_RES_TIME    250             /* 2.5 seconds                  */
  24 
  25 #define ARP_MAX_TRIES   3               /* max # of tries to send ARP   */
  26 #define ARP_QUEUE_MAGIC 0x0432447A      /* magic # for queues           */
  27 
  28 
  29 /* This structure defines the ARP mapping cache. */
  30 struct arp_table {
  31   struct arp_table              *next;
  32   volatile unsigned long        last_used;
  33   unsigned int                  flags;
  34 #if 1
  35   unsigned long                 ip;
  36 #else
  37   unsigned char                 pa[MAX_ADDR_LEN];
  38   unsigned char                 plen;
  39   unsigned char                 ptype;
  40 #endif
  41   unsigned char                 ha[MAX_ADDR_LEN];
  42   unsigned char                 hlen;
  43   unsigned char                 htype;
  44 };
  45 
  46 
  47 /* This is also used in "sock.c" and "tcp.c" - YUCK! - FvK */
  48 extern struct sk_buff *arp_q;
  49 
  50 
  51 extern void     arp_destroy(unsigned long paddr);
  52 extern int      arp_rcv(struct sk_buff *skb, struct device *dev,
  53                         struct packet_type *pt);
  54 extern int      arp_find(unsigned char *haddr, unsigned long paddr,
  55                          struct device *dev, unsigned long saddr);
  56 extern void     arp_add(unsigned long addr, unsigned char *haddr,
  57                         struct device *dev);
  58 extern void     arp_add_broad(unsigned long addr, struct device *dev);
  59 extern void     arp_queue(struct sk_buff *skb);
  60 extern int      arp_get_info(char *buffer);
  61 extern int      arp_ioctl(unsigned int cmd, void *arg);
  62 
  63 #endif  /* _ARP_H */

/* [previous][next][first][last][top][bottom][index][help] */