* add p cc
[mascara-docs.git] / i386 / linux / linux-2.3.21 / include / net / atmclip.h
blobf350c310307d6d4a1fe6955ba178854c6a98ea6b
1 /* net/atm/atmarp.h - RFC1577 ATM ARP */
3 /* Written 1995-1998 by Werner Almesberger, EPFL LRC/ICA */
6 #ifndef _ATMCLIP_H
7 #define _ATMCLIP_H
9 #include <linux/netdevice.h>
10 #include <linux/skbuff.h>
11 #include <linux/atm.h>
12 #include <linux/atmdev.h>
13 #include <linux/atmarp.h>
14 #include <net/neighbour.h>
17 #define CLIP_VCC(vcc) ((struct clip_vcc *) ((vcc)->user_back))
18 #define NEIGH2ENTRY(neigh) ((struct atmarp_entry *) (neigh)->primary_key)
21 struct clip_vcc {
22 struct atm_vcc *vcc; /* VCC descriptor */
23 struct atmarp_entry *entry; /* ATMARP table entry, NULL if IP addr.
24 isn't known yet */
25 unsigned char encap; /* 0: NULL, 1: LLC/SNAP */
26 unsigned long last_use; /* last send or receive operation */
27 unsigned long idle_timeout; /* keep open idle for so many jiffies*/
28 void (*old_push)(struct atm_vcc *vcc,struct sk_buff *skb);
29 /* keep old push fn for detaching */
30 struct clip_vcc *next; /* next VCC */
34 struct atmarp_entry {
35 u32 ip; /* IP address */
36 struct clip_vcc *vccs; /* active VCCs; NULL if resolution is
37 pending */
38 unsigned long expires; /* entry expiration time */
39 struct neighbour *neigh; /* neighbour back-pointer */
43 #define PRIV(dev) ((struct clip_priv *) ((struct net_device *) (dev)+1))
46 struct clip_priv {
47 char name[8]; /* interface name */
48 int number; /* for convenience ... */
49 struct net_device_stats stats;
50 struct net_device *next; /* next CLIP interface */
54 extern struct atm_vcc *atmarpd; /* ugly */
55 extern struct neigh_table clip_tbl;
57 int clip_create(int number);
58 int clip_mkip(struct atm_vcc *vcc,int timeout);
59 int clip_setentry(struct atm_vcc *vcc,u32 ip);
60 int clip_encap(struct atm_vcc *vcc,int mode);
61 void atm_clip_init(void);
63 #endif