Lines Matching refs:pkt
24 static int cfdgml_receive(struct cflayer *layr, struct cfpkt *pkt);
25 static int cfdgml_transmit(struct cflayer *layr, struct cfpkt *pkt);
40 static int cfdgml_receive(struct cflayer *layr, struct cfpkt *pkt) in cfdgml_receive() argument
49 if (cfpkt_extr_head(pkt, &cmd, 1) < 0) { in cfdgml_receive()
51 cfpkt_destroy(pkt); in cfdgml_receive()
56 if (cfpkt_extr_head(pkt, &dgmhdr, 3) < 0) { in cfdgml_receive()
58 cfpkt_destroy(pkt); in cfdgml_receive()
61 ret = layr->up->receive(layr->up, pkt); in cfdgml_receive()
68 cfpkt_destroy(pkt); in cfdgml_receive()
72 cfpkt_destroy(pkt); in cfdgml_receive()
75 cfpkt_destroy(pkt); in cfdgml_receive()
81 static int cfdgml_transmit(struct cflayer *layr, struct cfpkt *pkt) in cfdgml_transmit() argument
90 cfpkt_destroy(pkt); in cfdgml_transmit()
95 if (cfpkt_getlen(pkt) > DGM_MTU) { in cfdgml_transmit()
96 cfpkt_destroy(pkt); in cfdgml_transmit()
100 cfpkt_add_head(pkt, &zero, 3); in cfdgml_transmit()
102 cfpkt_add_head(pkt, &packet_type, 1); in cfdgml_transmit()
105 info = cfpkt_info(pkt); in cfdgml_transmit()
112 return layr->dn->transmit(layr->dn, pkt); in cfdgml_transmit()