Lines Matching refs:pctx

61 ICMPOutput(struct mtcp_manager *mtcp, struct pkt_ctx *pctx, uint32_t saddr, uint32_t daddr,  in ICMPOutput()  argument
86 if (!pctx->forward) in ICMPOutput()
100 iph = (struct iphdr *)EthernetOutput(mtcp, pctx, ETH_P_IP, nif, haddr, pktlen, ts); in ICMPOutput()
142 RequestICMP(mtcp_manager_t mtcp, struct pkt_ctx *pctx, uint32_t saddr, uint32_t daddr, in RequestICMP() argument
147 ICMPOutput(mtcp, pctx, saddr, daddr, ICMP_ECHO, 0, ntohs(icmp_id), ntohs(icmp_sequence), in RequestICMP()
152 ProcessICMPECHORequest(mtcp_manager_t mtcp, struct pkt_ctx *pctx, struct icmphdr *icmph) in ProcessICMPECHORequest() argument
157 if (ICMPChecksum((uint16_t *) icmph, pctx->p.ip_len - (pctx->p.iph->ihl << 2) )) in ProcessICMPECHORequest()
160 ICMPOutput(mtcp, pctx, pctx->p.iph->daddr, pctx->p.iph->saddr, ICMP_ECHOREPLY, 0, in ProcessICMPECHORequest()
162 (uint16_t) (pctx->p.ip_len - (pctx->p.iph->ihl << 2) - sizeof(struct icmphdr)) ); in ProcessICMPECHORequest()
168 ProcessICMPECHOReply(mtcp_manager_t mtcp, struct pkt_ctx *pctx, struct icmphdr *icmph) in ProcessICMPECHOReply() argument
187 ProcessICMPPacket(mtcp_manager_t mtcp, struct pkt_ctx *pctx) in ProcessICMPPacket() argument
189 struct icmphdr *icmph = (struct icmphdr *) IP_NEXT_PTR(pctx->p.iph); in ProcessICMPPacket()
195 if (pctx->p.iph->daddr == g_config.mos->netdev_table->ent[i]->ip_addr) { in ProcessICMPPacket()
206 ProcessICMPECHORequest(mtcp, pctx, icmph); in ProcessICMPPacket()
210 ProcessICMPECHOReply(mtcp, pctx, icmph); in ProcessICMPPacket()