patch-1.3.70 linux/net/appletalk/aarp.c
Next file: linux/net/appletalk/ddp.c
Previous file: linux/kernel/sys.c
Back to the patch index
Back to the overall index
- Lines: 48
- Date:
Fri Mar 1 07:22:56 1996
- Orig file:
v1.3.69/linux/net/appletalk/aarp.c
- Orig date:
Thu Jan 4 21:54:59 1996
diff -u --recursive --new-file v1.3.69/linux/net/appletalk/aarp.c linux/net/appletalk/aarp.c
@@ -432,6 +432,47 @@
unsigned long flags;
/*
+ * Check for localtalk first
+ */
+
+ if(dev->type==ARPHRD_LOCALTLK)
+ {
+ struct at_addr *at=atalk_find_dev_addr(dev);
+ int ft=2;
+
+ /*
+ * Compressable ?
+ */
+
+ if(at->s_net==sa->s_net)
+ {
+ skb_pull(skb,sizeof(struct ddpehdr)-4);
+ /*
+ * The uper two remaining bytes are the port
+ * numbers we just happen to need. Now put the
+ * length in the lower two.
+ */
+ *((__u16 *)skb->data)=htons(skb->len);
+ ft=1;
+ }
+ /*
+ * Nice and easy. No AARP type protocols occur here
+ * so we can just shovel it out with a 3 byte LLAP header
+ */
+
+ skb_push(skb,3);
+ skb->data[0]=sa->s_node;
+ skb->data[1]=at->s_node;
+ skb->data[2]=ft;
+
+ if(skb->sk==NULL)
+ dev_queue_xmit(skb, skb->dev, SOPRI_NORMAL);
+ else
+ dev_queue_xmit(skb, skb->dev, skb->sk->priority);
+ return 1;
+ }
+
+ /*
* Non ELAP we cannot do.
*/
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this