Lines Matching defs:pkt
181 int aarp_rcv_pkt(pkt, elapp)
182 aarp_pkt_t *pkt;
185 switch (ntohs(pkt->aarp_cmd)) {
187 return (aarp_req_cmd_in (pkt, elapp));
189 return (aarp_resp_cmd_in (pkt, elapp));
191 return (aarp_probe_cmd_in (pkt, elapp));
201 StaticProc int aarp_req_cmd_in (pkt, elapp)
202 aarp_pkt_t *pkt;
209 NET_VALUE(pkt->src_at_addr.atalk_net),
210 pkt->src_at_addr.atalk_node,
211 NET_VALUE(pkt->dest_at_addr.atalk_net),
212 pkt->dest_at_addr.atalk_node);
215 (NET_VALUE(pkt->dest_at_addr.atalk_net) == elapp->ifThisNode.s_net) &&
216 (pkt->dest_at_addr.atalk_node == elapp->ifThisNode.s_node)) {
217 if (aarp_send_resp(elapp, pkt) == -1)
221 aarp_glean_info(pkt, elapp);
231 StaticProc int aarp_resp_cmd_in (pkt, elapp)
232 aarp_pkt_t *pkt;
240 if ((NET_VALUE(pkt->src_at_addr.atalk_net) ==
242 (pkt->src_at_addr.atalk_node ==
285 AMT_LOOK(amt_ptr, pkt->src_at_addr, elapp)
302 amt_ptr->dest_addr = pkt->src_addr;
323 StaticProc int aarp_probe_cmd_in (pkt, elapp)
324 register aarp_pkt_t *pkt;
332 (NET_VALUE(pkt->src_at_addr.atalk_net) ==
334 (pkt->src_at_addr.atalk_node ==
373 if ((NET_VALUE(pkt->src_at_addr.atalk_net) == elapp->ifThisNode.s_net) &&
374 (pkt->src_at_addr.atalk_node == elapp->ifThisNode.s_node)) {
375 if (aarp_send_resp(elapp, pkt) == -1)
379 AMT_LOOK(amt_ptr, pkt->src_at_addr, elapp);
534 * The pkt being passed here is only to "look at". It should neither
539 StaticProc int aarp_send_resp(elapp, pkt)
541 aarp_pkt_t *pkt;
556 new_pkt->dest_addr = pkt->src_addr;
558 new_pkt->dest_at_addr = pkt->src_at_addr;
584 register aarp_pkt_t *pkt;
594 pkt = (aarp_pkt_t *)gbuf_rptr(m);
595 aarp_build_pkt(pkt, amt_ptr->elapp);
597 pkt->aarp_cmd = htons(AARP_REQ_CMD);
598 pkt->dest_addr = et_zeroaddr;
599 pkt->dest_at_addr = amt_ptr->dest_at_addr;
600 pkt->dest_at_addr.atalk_unused = 0;
601 ATALK_ASSIGN(pkt->src_at_addr, amt_ptr->elapp->ifThisNode.s_net,
628 register aarp_pkt_t *pkt;
637 pkt = (aarp_pkt_t *)gbuf_rptr(m);
638 aarp_build_pkt(pkt, probe_cb.elapp);
640 pkt->aarp_cmd = htons(AARP_PROBE_CMD);
641 pkt->dest_addr = et_zeroaddr;
643 ATALK_ASSIGN(pkt->src_at_addr, probe_cb.elapp->initial_addr.s_net,
646 ATALK_ASSIGN(pkt->dest_at_addr, probe_cb.elapp->initial_addr.s_net,
693 StaticProc int aarp_glean_info(pkt, elapp)
694 register aarp_pkt_t *pkt;
699 AMT_LOOK(amt_ptr, pkt->src_at_addr, elapp);
705 NEW_AMT(amt_ptr, pkt->src_at_addr,elapp);
709 amt_ptr->dest_at_addr = pkt->src_at_addr;
718 amt_ptr->dest_addr = pkt->src_addr;
777 StaticProc void aarp_build_pkt(pkt, elapp)
778 register aarp_pkt_t *pkt;
781 pkt->hardware_type = htons(AARP_ETHER_HW_TYPE);
782 pkt->stack_type = htons(AARP_AT_PROTO);
783 pkt->hw_addr_len = ETHERNET_ADDR_LEN;
784 pkt->stack_addr_len = AARP_AT_ADDR_LEN;
785 bcopy(elapp->xaddr, pkt->src_addr.etalk_addr_octet, sizeof(elapp->xaddr));
787 ddp_bit_reverse(pkt->src_addr.etalk_addr_octet);