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.28    24/12/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 /* 
  30  *      This structure defines the ARP mapping cache.
  31  */
  32  
  33 struct arp_table 
  34 {
  35         struct arp_table                *next;
  36         volatile unsigned long  last_used;
  37         unsigned int                    flags;
  38         unsigned long                   ip;
  39         unsigned char                   ha[MAX_ADDR_LEN];
  40         unsigned char                   hlen;
  41         unsigned char                   htype;
  42 };
  43 
  44 
  45 /*
  46  *      This is also used in "sock.c" and "tcp.c" - YUCK! - FvK 
  47  */
  48  
  49 extern struct sk_buff *arp_q;
  50 
  51 
  52 extern void     arp_destroy(unsigned long paddr);
  53 extern void     arp_destroy_maybe(unsigned long paddr);
  54 extern int      arp_rcv(struct sk_buff *skb, struct device *dev,
  55                         struct packet_type *pt);
  56 extern int      arp_find(unsigned char *haddr, unsigned long paddr,
  57                          struct device *dev, unsigned long saddr);
  58 extern void     arp_add(unsigned long addr, unsigned char *haddr,
  59                         struct device *dev);
  60 extern void     arp_add_broad(unsigned long addr, struct device *dev);
  61 extern void     arp_queue(struct sk_buff *skb);
  62 extern int      arp_get_info(char *buffer);
  63 extern int      arp_ioctl(unsigned int cmd, void *arg);
  64 
  65 #endif  /* _ARP_H */

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