Home
last modified time | relevance | path

Searched refs:iph (Results 1 – 17 of 17) sorted by relevance

/mOS-networking-stack/core/src/
H A Dip_out.c96 if (iph) in ForwardIPPacket()
97 memcpy(iph, pctx->p.iph, pctx->p.ip_len); in ForwardIPPacket()
115 pctx->p.iph = iph; in FillOutPacketIPContext()
153 if (!iph) { in IPOutputStandalone()
159 iph->tos = 0; in IPOutputStandalone()
163 iph->ttl = 64; in IPOutputStandalone()
174 iph->check = ip_fast_csum(iph, iph->ihl); in IPOutputStandalone()
215 if (!iph) { in IPOutput()
221 iph->tos = 0; in IPOutput()
225 iph->ttl = 64; in IPOutput()
[all …]
H A Ddebug.c100 udph = (struct udphdr *)((uint32_t *)iph + iph->ihl); in DumpPacket()
101 tcph = (struct tcphdr *)((uint32_t *)iph + iph->ihl); in DumpPacket()
118 if (ip_fast_csum(iph, iph->ihl)) { in DumpPacket()
122 iph->check = 0; in DumpPacket()
123 correct_csum = ip_fast_csum(iph, iph->ihl); in DumpPacket()
165 udph = (struct udphdr *)((uint32_t *)iph + iph->ihl); in DumpIPPacket()
166 tcph = (struct tcphdr *)((uint32_t *)iph + iph->ihl); in DumpIPPacket()
183 if (ip_fast_csum(iph, iph->ihl)) { in DumpIPPacket()
223 udph = (struct udphdr *)((uint32_t *)iph + iph->ihl); in DumpIPPacketToFile()
224 tcph = (struct tcphdr *)((uint32_t *)iph + iph->ihl); in DumpIPPacketToFile()
[all …]
H A Dicmp.c16 #define IP_NEXT_PTR(iph) ((uint8_t *)iph + (iph->ihl << 2)) argument
65 struct iphdr *iph; in ICMPOutput() local
101 if (!iph) in ICMPOutput()
106 iph->version = 4; in ICMPOutput()
107 iph->tos = 0; in ICMPOutput()
109 iph->id = htons(0); in ICMPOutput()
111 iph->ttl = 64; in ICMPOutput()
113 iph->saddr = saddr; in ICMPOutput()
114 iph->daddr = daddr; in ICMPOutput()
115 iph->check = 0; in ICMPOutput()
[all …]
H A Dtcp.c94 pctx->p.iph->daddr, pctx->p.tcph->dest, in CreateServerStream()
185 temp_stream.saddr = pctx->p.iph->daddr; in FindStream()
187 temp_stream.daddr = pctx->p.iph->saddr; in FindStream()
200 const struct iphdr *iph = pctx->p.iph; in CreateStream() local
252 DumpIPPacket(mtcp, iph, pctx->p.ip_len); in CreateStream()
413 struct iphdr* iph; in ProcessInTCPPacket() local
418 iph = pctx->p.iph; in ProcessInTCPPacket()
419 tcph = (struct tcphdr *)((u_char *)pctx->p.iph + (pctx->p.iph->ihl << 2)); in ProcessInTCPPacket()
435 iph->saddr, pctx->p.iph->daddr)) { in ProcessInTCPPacket()
439 iph->saddr, iph->daddr)); in ProcessInTCPPacket()
[all …]
H A Dip_in.c22 FillInPacketIPContext (struct pkt_ctx *pctx, struct iphdr *iph, int ip_len) in FillInPacketIPContext() argument
24 pctx->p.iph = iph; in FillInPacketIPContext()
37 struct iphdr* iph = in ProcessInIPv4Packet() local
39 int ip_len = ntohs(iph->tot_len); in ProcessInIPv4Packet()
47 if (iph->version != IPVERSION ) { in ProcessInIPv4Packet()
53 FillInPacketIPContext(pctx, iph, ip_len); in ProcessInIPv4Packet()
74 if (ip_fast_csum(iph, iph->ihl)) { in ProcessInIPv4Packet()
79 switch (iph->protocol) { in ProcessInIPv4Packet()
H A Dmos_api.c438 to->iph = from->iph ? in ClonePacketCtx()
440 if (to->iph) { in ClonePacketCtx()
443 (struct tcphdr *)(((uint8_t *)(to->iph)) + (to->iph->ihl<<2)) : NULL; in ClonePacketCtx()
938 struct iphdr *iph; in mtcp_setlastpkt() local
1098 if (iph == NULL || in mtcp_setlastpkt()
1144 tcph = (struct tcphdr *)((uint8_t *)iph + (iph->ihl<<2)); in mtcp_setlastpkt()
1182 iph->check = 0; in mtcp_setlastpkt()
1183 iph->check = ip_fast_csum(iph, iph->ihl); in mtcp_setlastpkt()
1189 tcph = (struct tcphdr *)((uint8_t *)iph + (iph->ihl<<2)); in mtcp_setlastpkt()
1192 ntohs(iph->tot_len) - (iph->ihl<<2), in mtcp_setlastpkt()
[all …]
H A Dapi.c957 struct iphdr *iph; in eval_bpf_5tuple() local
962 iph = (struct iphdr *)(ethh + 1); in eval_bpf_5tuple()
963 iph->ihl = IP_HEADER_LEN >> 2; in eval_bpf_5tuple()
964 iph->version = 4; in eval_bpf_5tuple()
965 iph->tos = 0; in eval_bpf_5tuple()
967 iph->id = htons(0); in eval_bpf_5tuple()
968 iph->protocol = IPPROTO_TCP; in eval_bpf_5tuple()
969 iph->saddr = saddr; in eval_bpf_5tuple()
970 iph->daddr = daddr; in eval_bpf_5tuple()
971 iph->check = 0; in eval_bpf_5tuple()
[all …]
H A Ddpdk_module.c540 struct iphdr *iph; in dpdk_dev_ioctl() local
550 iph = (struct iphdr *)argp; in dpdk_dev_ioctl()
560 m->l3_len = (iph->ihl<<2); in dpdk_dev_ioctl()
564 tcph = (struct tcphdr *)((unsigned char *)iph + (iph->ihl<<2)); in dpdk_dev_ioctl()
566 tcph->check = rte_ipv4_phdr_cksum((struct ipv4_hdr *)iph, m->ol_flags); in dpdk_dev_ioctl()
H A Dtcp_in.c1019 DumpIPPacket(mtcp, pctx->p.iph, pctx->p.ip_len); in Handle_TCP_ST_LAST_ACK()
1216 DumpIPPacket(mtcp, pctx->p.iph, pctx->p.ip_len);
1246 DumpIPPacketToFile(stderr, pctx->p.iph, pctx->p.ip_len);
1287 DumpIPPacket(mtcp, pctx->p.iph, pctx->p.ip_len);
1424 pctx->p.iph->daddr, pctx->p.tcph->dest,
1425 pctx->p.iph->saddr, pctx->p.tcph->source,
1430 pctx->p.iph->daddr, pctx->p.tcph->dest,
1431 pctx->p.iph->saddr, pctx->p.tcph->source,
H A Dtcp_out.c213 pctx.p.iph); in SendTCPPacketStandalone()
348 pctx.p.iph); in SendTCPPacket()
997 cur_stream->sndvar->ip_id = htons(pctx->p.iph->id); in UpdatePassiveSendTCPContext_SynSent()
H A Devent_callback.c646 (uint8_t *)pctx->p.iph - sizeof(struct ethhdr), in HandleCallback()
654 (uint8_t *)pctx->p.iph - sizeof(struct ethhdr), in HandleCallback()
H A Dscalable_event.c1070 (uint8_t *)pctx->p.iph - sizeof(struct ethhdr), in HandleCallback()
1078 (uint8_t *)pctx->p.iph - sizeof(struct ethhdr), in HandleCallback()
/mOS-networking-stack/core/src/include/
H A Dip_in.h10 static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) in ip_fast_csum() argument
34 : "=r" (sum), "=r" (iph), "=r" (ihl) in ip_fast_csum()
35 : "1" (iph), "2" (ihl) in ip_fast_csum()
H A Ddebug.h237 DumpIPPacket(mtcp_manager_t mtcp, const struct iphdr *iph, int len);
240 DumpIPPacketToFile(FILE *fout, const struct iphdr *iph, int len);
H A Dmos_api.h149 struct iphdr *iph; member
/mOS-networking-stack/samples/simple_firewall/
H A Dsimple_firewall.c346 action = FWRLookup(p.iph->saddr, p.iph->daddr, in ApplyActionPerFlow()
/mOS-networking-stack/core/include/
H A Dmos_api.h149 struct iphdr *iph; member