]> git.hungrycats.org Git - linux/commitdiff
[ATM]: exporting llc_oui[] isn't worth it (from mitch@sfgoth.com)
authorChas Williams <chas@cmf.nrl.navy.mil>
Thu, 11 Sep 2003 11:23:45 +0000 (04:23 -0700)
committerHideaki Yoshifuji <yoshfuji@linux-ipv6.org>
Thu, 11 Sep 2003 11:23:45 +0000 (04:23 -0700)
include/linux/atmclip.h
net/atm/clip.c
net/atm/ipcommon.c
net/sched/sch_atm.c

index 7d657c0dcb2dd554ec9513f26429aed58651e867..02c94c448dd65bced3fc5f1e581de6302dc3b69f 100644 (file)
@@ -18,8 +18,4 @@
 
 #define        SIOCMKCLIP      _IO('a',ATMIOC_CLIP)    /* create IP interface */
 
-#ifdef __KERNEL__
-extern const unsigned char llc_oui[6];
-#endif
-
 #endif
index 74a58eee32fd3f4e6551bcf626471e351266b4ca..39f87d4d2948a5fa261200e77adb231e31e58131 100644 (file)
@@ -189,6 +189,13 @@ static int clip_arp_rcv(struct sk_buff *skb)
        return 0;
 }
 
+static const unsigned char llc_oui[] = {
+       0xaa,   /* DSAP: non-ISO */
+       0xaa,   /* SSAP: non-ISO */
+       0x03,   /* Ctrl: Unnumbered Information Command PDU */
+       0x00,   /* OUI: EtherType */
+       0x00,
+       0x00 };
 
 static void clip_push(struct atm_vcc *vcc,struct sk_buff *skb)
 {
index f939736e379707dd02466d5e3602e830cc7c2cc3..181a3002d8adc5eebfc117e609ba4427ccf8ff2f 100644 (file)
 #endif
 
 
-const unsigned char llc_oui[] = {
-       0xaa,   /* DSAP: non-ISO */
-       0xaa,   /* SSAP: non-ISO */
-       0x03,   /* Ctrl: Unnumbered Information Command PDU */
-       0x00,   /* OUI: EtherType */
-       0x00,
-       0x00 };
-
-
 /*
  * skb_migrate appends the list at "from" to "to", emptying "from" in the
  * process. skb_migrate is atomic with respect to all other skb operations on
@@ -67,5 +58,4 @@ void skb_migrate(struct sk_buff_head *from,struct sk_buff_head *to)
 }
 
 
-EXPORT_SYMBOL(llc_oui);
 EXPORT_SYMBOL(skb_migrate);
index 8e0a87c683d1ed90a4539f5d7cab946a2519d077..a6d9728d3aa1506e63aa0e457d9c86ce6017a252 100644 (file)
@@ -216,6 +216,13 @@ static void sch_atm_pop(struct atm_vcc *vcc,struct sk_buff *skb)
        tasklet_schedule(&p->task);
 }
 
+static const u8 llc_oui_ip[] = {
+       0xaa,           /* DSAP: non-ISO */
+       0xaa,           /* SSAP: non-ISO */
+       0x03,           /* Ctrl: Unnumbered Information Command PDU */
+       0x00,           /* OUI: EtherType */
+       0x00, 0x00,
+       0x08, 0x00 };   /* Ethertype IP (0800) */
 
 static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent,
     struct rtattr **tca, unsigned long *arg)
@@ -322,11 +329,10 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent,
        flow->next = p->link.next;
        p->link.next = flow;
        flow->hdr_len = hdr_len;
-       if (hdr) memcpy(flow->hdr,hdr,hdr_len);
-       else {
-               memcpy(flow->hdr,llc_oui,sizeof(llc_oui));
-               ((u16 *) flow->hdr)[3] = htons(ETH_P_IP);
-       }
+       if (hdr)
+               memcpy(flow->hdr,hdr,hdr_len);
+       else
+               memcpy(flow->hdr,llc_oui_ip,sizeof(llc_oui_ip));
        *arg = (unsigned long) flow;
        return 0;
 err_out: