patch-1.3.7 linux/net/netrom/nr_out.c
Next file: linux/net/netrom/nr_route.c
Previous file: linux/net/netrom/nr_in.c
Back to the patch index
Back to the overall index
- Lines: 47
- Date:
Wed Jul 5 13:06:28 1995
- Orig file:
v1.3.6/linux/net/netrom/nr_out.c
- Orig date:
Fri Jun 30 16:22:34 1995
diff -u --recursive --new-file v1.3.6/linux/net/netrom/nr_out.c linux/net/netrom/nr_out.c
@@ -56,15 +56,11 @@
*/
static void nr_send_iframe(struct sock *sk, struct sk_buff *skb)
{
- unsigned char *dptr;
-
if (skb == NULL)
return;
- dptr = skb->data + 17;
-
- *dptr++ = sk->nr->vs;
- *dptr++ = sk->nr->vr;
+ skb->data[2] = sk->nr->vs;
+ skb->data[3] = sk->nr->vr;
nr_transmit_buffer(sk, skb);
}
@@ -151,24 +147,21 @@
unsigned char *dptr;
/*
- * Add the protocol byte
+ * Add the protocol byte and network header.
*/
-
- dptr = skb_push(skb,1);
+ dptr = skb_push(skb, NR_NETWORK_LEN);
- *dptr++ = AX25_P_NETROM;
-
memcpy(dptr, &sk->nr->source_addr, sizeof(ax25_address));
dptr[6] &= ~LAPB_C;
dptr[6] &= ~LAPB_E;
dptr[6] |= SSID_SPARE;
- dptr += 7;
+ dptr += AX25_ADDR_LEN;
memcpy(dptr, &sk->nr->dest_addr, sizeof(ax25_address));
dptr[6] &= ~LAPB_C;
dptr[6] |= LAPB_E;
dptr[6] |= SSID_SPARE;
- dptr += 7;
+ dptr += AX25_ADDR_LEN;
*dptr++ = nr_default.ttl;
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