Lines Matching refs:mp
251 * checksum = ddp_checksum(mp, offset)
254 * mp pointer to the datagram gbuf_t
262 u_short ddp_checksum(mp, offset)
263 register gbuf_t *mp;
273 if (offset >= gbuf_len(mp))
274 offset -= gbuf_len(mp);
276 data = ((unsigned char *) gbuf_rptr(mp)) + offset;
277 length = gbuf_len(mp) - offset;
286 } while ( (mp = gbuf_cont(mp)) );
514 * The mbuf chain pointed to by *mp is consumed on success, and
518 int ddp_output(mp, src_socket, src_addr_included)
519 register gbuf_t **mp;
542 m = *mp;
549 gbuf_freel(*mp);
560 gbuf_freel(*mp);
563 if ((len = gbuf_msgsize(*mp)) > DDP_DATAGRAM_SIZE) {
569 gbuf_freel(*mp);
628 fillin_pkt_chain(*mp);
634 for (mdata = *mp; mdata; mdata = mdata_next) {
642 (zip_type_packet(*mp) == ZIP_GETMYZONE)) {
644 error = zip_handle_getmyzone(ifID, *mp);
645 gbuf_freel(*mp);
709 gbuf_freel(*mp);
725 routing_needed(*mp, ifID, TRUE);
734 gbuf_freel(*mp);
780 fillin_pkt_chain(*mp);
788 m = *mp;
869 void ddp_input(mp, ifID)
870 register gbuf_t *mp;
880 ifID, mp, gbuf_len(mp),0);
892 gbuf_freem(mp);
904 if ((mp = (gbuf_t *)ddp_compress_msg(mp)) == NULL) {
911 msgsize = gbuf_msgsize(mp);
931 gbuf_freem(mp);
938 ddp = (at_ddp_t *)gbuf_rptr(mp);
949 gbuf_freem(mp);
955 mp = ddp_adjmsg(mp, -(msgsize - len)) ? mp : 0;
956 if (mp == 0)
964 gbuf_freem(mp);
981 gbuf_freem(mp);
988 (UAS_VALUE_NTOH(ddp->checksum) != ddp_checksum(mp, 4))) {
991 ddp_checksum(mp, 4), UAS_VALUE_NTOH(ddp->checksum)));
994 gbuf_freem(mp);
1017 (*ddp_handler[socket].func)(mp, ifID);
1039 atp_input(mp);
1045 adsp_input(mp);
1069 mp = m_pullup((struct mbuf *)mp,
1071 if (mp) {
1072 gbuf_rinc(mp, DDP_X_HDR_SIZE);
1083 mp, 0, NULL) != 0) {
1087 atalk_putnext(gref, mp);
1093 gbuf_freem(mp);
1105 gbuf_freem(mp);
1108 routing_needed(mp, ifID, FALSE);
1129 int ddp_router_output(mp, ifID, addr_type, router_net, router_node, enet_addr)
1130 gbuf_t *mp;
1145 gbuf_freel(mp);
1148 ddp = (at_ddp_t *)gbuf_rptr(mp);
1153 fillin_pkt_chain(mp);
1156 ddp_AURPsendx(AURPCODE_DATAPKT, mp, router_node);
1159 gbuf_freel(mp);
1167 if (gbuf_msgsize(mp) > DDP_DATAGRAM_SIZE) {
1171 gbuf_msgsize(mp)));
1172 gbuf_freel(mp);
1191 ddp_input(mp, ifID);
1216 gbuf_freel(mp);
1220 fillin_pkt_chain(mp);
1227 m = mp;