Lines Matching full:pcb

58 #include <machine/pcb.h>
76 * pcb a pointer to the live debugnet PCB
82 debugnet_handle_ip(struct debugnet_pcb *pcb, struct mbuf **mb) in debugnet_handle_ip() argument
88 if (pcb->dp_state < DN_STATE_HAVE_GW_MAC) in debugnet_handle_ip()
177 if (ip->ip_src.s_addr != pcb->dp_server) { in debugnet_handle_ip()
184 if (ip->ip_dst.s_addr != pcb->dp_client) { in debugnet_handle_ip()
217 debugnet_handle_udp(pcb, mb); in debugnet_handle_ip()
229 debugnet_send_arp(struct debugnet_pcb *pcb, in_addr_t dst) in debugnet_send_arp() argument
237 ifp = pcb->dp_ifp; in debugnet_send_arp()
257 ((struct in_addr *)ar_spa(ah))->s_addr = pcb->dp_client; in debugnet_send_arp()
272 * pcb a pointer to the live debugnet PCB
278 debugnet_handle_arp(struct debugnet_pcb *pcb, struct mbuf **mb) in debugnet_handle_arp() argument
332 if (isaddr.s_addr == pcb->dp_client) { in debugnet_handle_arp()
345 if (isaddr.s_addr != pcb->dp_gateway && in debugnet_handle_arp()
346 isaddr.s_addr != pcb->dp_server) { in debugnet_handle_arp()
352 if (pcb->dp_state >= DN_STATE_HAVE_GW_MAC) { in debugnet_handle_arp()
358 MPASS(pcb->dp_state == DN_STATE_INIT); in debugnet_handle_arp()
359 memcpy(pcb->dp_gw_mac.octet, ar_sha(ah), in debugnet_handle_arp()
363 pcb->dp_gw_mac.octet, ":"); in debugnet_handle_arp()
365 pcb->dp_state = DN_STATE_HAVE_GW_MAC; in debugnet_handle_arp()
374 if (itaddr.s_addr != pcb->dp_client) { in debugnet_handle_arp()
404 debugnet_arp_gw(struct debugnet_pcb *pcb) in debugnet_arp_gw() argument
409 dst = pcb->dp_server; in debugnet_arp_gw()
412 error = debugnet_send_arp(pcb, dst); in debugnet_arp_gw()
416 pcb->dp_state < DN_STATE_HAVE_GW_MAC; polls++) { in debugnet_arp_gw()
417 debugnet_network_poll(pcb); in debugnet_arp_gw()
420 if (pcb->dp_state >= DN_STATE_HAVE_GW_MAC) in debugnet_arp_gw()
424 if (pcb->dp_state >= DN_STATE_HAVE_GW_MAC) in debugnet_arp_gw()
426 if (dst == pcb->dp_server) { in debugnet_arp_gw()
428 if (pcb->dp_gateway != INADDR_ANY) { in debugnet_arp_gw()
430 dst = pcb->dp_gateway; in debugnet_arp_gw()
446 * pcb The debugnet context block
453 debugnet_ip_output(struct debugnet_pcb *pcb, struct mbuf *m) in debugnet_ip_output() argument
459 MPASS(pcb->dp_state >= DN_STATE_HAVE_GW_MAC); in debugnet_ip_output()
461 ifp = pcb->dp_ifp; in debugnet_ip_output()
482 ip->ip_src = (struct in_addr) { pcb->dp_client }; in debugnet_ip_output()
483 ip->ip_dst = (struct in_addr) { pcb->dp_server }; in debugnet_ip_output()
500 return (debugnet_ether_output(m, ifp, pcb->dp_gw_mac, ETHERTYPE_IP)); in debugnet_ip_output()