Lines Matching refs:ddp
1321 struct ddpehdr *ddp, __u16 len_hops, int origlen) in atalk_route_packet() argument
1330 if (skb->pkt_type != PACKET_HOST || !ddp->deh_dnet) { in atalk_route_packet()
1343 ta.s_net = ddp->deh_dnet; in atalk_route_packet()
1344 ta.s_node = ddp->deh_dnode; in atalk_route_packet()
1371 ddp->deh_len_hops = htons(len_hops); in atalk_route_packet()
1424 struct ddpehdr *ddp; in atalk_rcv() local
1439 if (!pskb_may_pull(skb, sizeof(*ddp))) in atalk_rcv()
1442 ddp = ddp_hdr(skb); in atalk_rcv()
1444 len_hops = ntohs(ddp->deh_len_hops); in atalk_rcv()
1455 if (skb->len < sizeof(*ddp) || skb->len < (len_hops & 1023)) { in atalk_rcv()
1465 if (ddp->deh_sum && in atalk_rcv()
1466 atalk_checksum(skb, len_hops & 1023) != ddp->deh_sum) in atalk_rcv()
1471 if (!ddp->deh_dnet) /* Net 0 is 'this network' */ in atalk_rcv()
1472 atif = atalk_find_anynet(ddp->deh_dnode, dev); in atalk_rcv()
1474 atif = atalk_find_interface(ddp->deh_dnet, ddp->deh_dnode); in atalk_rcv()
1480 return atalk_route_packet(skb, dev, ddp, len_hops, origlen); in atalk_rcv()
1490 tosat.sat_addr.s_net = ddp->deh_dnet; in atalk_rcv()
1491 tosat.sat_addr.s_node = ddp->deh_dnode; in atalk_rcv()
1492 tosat.sat_port = ddp->deh_dport; in atalk_rcv()
1524 struct ddpehdr *ddp; in ltalk_rcv() local
1539 ddp = skb_push(skb, sizeof(*ddp) - 4); in ltalk_rcv()
1549 ddp->deh_dnode = skb_mac_header(skb)[0]; /* From physical header */ in ltalk_rcv()
1550 ddp->deh_snode = skb_mac_header(skb)[1]; /* From physical header */ in ltalk_rcv()
1552 ddp->deh_dnet = ap->s_net; /* Network number */ in ltalk_rcv()
1553 ddp->deh_snet = ap->s_net; in ltalk_rcv()
1554 ddp->deh_sum = 0; /* No checksum */ in ltalk_rcv()
1559 ddp->deh_len_hops = htons(skb->len + (DDP_MAXHOPS << 10)); in ltalk_rcv()
1579 struct ddpehdr *ddp; in atalk_sendmsg() local
1672 ddp = skb_put(skb, sizeof(struct ddpehdr)); in atalk_sendmsg()
1673 ddp->deh_len_hops = htons(len + sizeof(*ddp)); in atalk_sendmsg()
1674 ddp->deh_dnet = usat->sat_addr.s_net; in atalk_sendmsg()
1675 ddp->deh_snet = at->src_net; in atalk_sendmsg()
1676 ddp->deh_dnode = usat->sat_addr.s_node; in atalk_sendmsg()
1677 ddp->deh_snode = at->src_node; in atalk_sendmsg()
1678 ddp->deh_dport = usat->sat_port; in atalk_sendmsg()
1679 ddp->deh_sport = at->src_port; in atalk_sendmsg()
1691 ddp->deh_sum = 0; in atalk_sendmsg()
1693 ddp->deh_sum = atalk_checksum(skb, len + sizeof(*ddp)); in atalk_sendmsg()
1699 if (ddp->deh_dnode == ATADDR_BCAST && in atalk_sendmsg()
1717 if (ddp->deh_dnode == ATADDR_BCAST) { in atalk_sendmsg()
1750 struct ddpehdr *ddp; in atalk_recvmsg() local
1763 ddp = ddp_hdr(skb); in atalk_recvmsg()
1764 copied = ntohs(ddp->deh_len_hops) & 1023; in atalk_recvmsg()
1767 offset = sizeof(*ddp); in atalk_recvmsg()
1780 sat->sat_port = ddp->deh_sport; in atalk_recvmsg()
1781 sat->sat_addr.s_node = ddp->deh_snode; in atalk_recvmsg()
1782 sat->sat_addr.s_net = ddp->deh_snet; in atalk_recvmsg()