Lines Matching refs:pcb

59 #include <machine/pcb.h>
77 * pcb a pointer to the live debugnet PCB
83 debugnet_handle_ip(struct debugnet_pcb *pcb, struct mbuf **mb)
175 if (ip->ip_src.s_addr != pcb->dp_server) {
182 if (ip->ip_dst.s_addr != pcb->dp_client) {
215 debugnet_handle_udp(pcb, mb);
227 debugnet_send_arp(struct debugnet_pcb *pcb, in_addr_t dst)
235 ifp = pcb->dp_ifp;
255 ((struct in_addr *)ar_spa(ah))->s_addr = pcb->dp_client;
270 * pcb a pointer to the live debugnet PCB
276 debugnet_handle_arp(struct debugnet_pcb *pcb, struct mbuf **mb)
330 if (isaddr.s_addr == pcb->dp_client) {
343 if (isaddr.s_addr != pcb->dp_gateway &&
344 isaddr.s_addr != pcb->dp_server) {
350 memcpy(pcb->dp_gw_mac.octet, ar_sha(ah),
354 pcb->dp_gw_mac.octet, ":");
356 MPASS(pcb->dp_state == DN_STATE_INIT);
357 pcb->dp_state = DN_STATE_HAVE_GW_MAC;
366 if (itaddr.s_addr != pcb->dp_client) {
396 debugnet_arp_gw(struct debugnet_pcb *pcb)
401 dst = pcb->dp_server;
404 error = debugnet_send_arp(pcb, dst);
408 pcb->dp_state < DN_STATE_HAVE_GW_MAC; polls++) {
409 debugnet_network_poll(pcb);
412 if (pcb->dp_state >= DN_STATE_HAVE_GW_MAC)
416 if (pcb->dp_state >= DN_STATE_HAVE_GW_MAC)
418 if (dst == pcb->dp_server) {
420 if (pcb->dp_gateway != INADDR_ANY) {
422 dst = pcb->dp_gateway;
438 * pcb The debugnet context block
445 debugnet_ip_output(struct debugnet_pcb *pcb, struct mbuf *m)
451 MPASS(pcb->dp_state >= DN_STATE_HAVE_GW_MAC);
453 ifp = pcb->dp_ifp;
474 ip->ip_src = (struct in_addr) { pcb->dp_client };
475 ip->ip_dst = (struct in_addr) { pcb->dp_server };
492 return (debugnet_ether_output(m, ifp, pcb->dp_gw_mac, ETHERTYPE_IP));