| /mOS-networking-stack/core/src/ |
| H A D | ip_out.c | 14 int nif = -1; in GetOutputInterface() local 23 nif = g_config.mos->route_table->ent[i]->nif; in GetOutputInterface() 29 if (nif < 0) { in GetOutputInterface() 36 return nif; in GetOutputInterface() 127 int nif; in IPOutputStandalone() local 131 nif = GetOutputInterface(daddr); in IPOutputStandalone() 132 if (nif < 0) in IPOutputStandalone() 186 int nif; in IPOutput() local 191 nif = stream->sndvar->nif_out; in IPOutput() 193 nif = GetOutputInterface(stream->daddr); in IPOutput() [all …]
|
| H A D | dpdk_module.c | 229 qid = cpu_qid_map[nif][ctxt->cpu]; in dpdk_send_pkts() 241 int cnt = dpc->wmbufs[nif].len; in dpdk_send_pkts() 242 pkts = dpc->wmbufs[nif].m_table; in dpdk_send_pkts() 244 mtcp->nstat.tx_packets[nif] += cnt; in dpdk_send_pkts() 252 ss.dev = nif; in dpdk_send_pkts() 259 ret = rte_eth_tx_burst(nif, qid, in dpdk_send_pkts() 274 ctxt->cpu, i, nif); in dpdk_send_pkts() 280 dpc->wmbufs[nif].len = 0; in dpdk_send_pkts() 302 len_of_mbuf = dpc->wmbufs[nif].len; in dpdk_get_wptr() 316 dpc->wmbufs[nif].len = len_of_mbuf + 1; in dpdk_get_wptr() [all …]
|
| H A D | eth_out.c | 46 FlushSendChunkBuf(mtcp_manager_t mtcp, int nif) in FlushSendChunkBuf() argument 64 uint16_t h_proto, int nif, unsigned char* dst_haddr, uint16_t iplen, in EthernetOutput() argument 75 if (nif < 0) { in EthernetOutput() 84 buf = mtcp->iom->get_wptr(mtcp->ctx, nif, iplen + ETHERNET_HEADER_LEN); in EthernetOutput() 92 ethh->h_source[i] = g_config.mos->netdev_table->ent[nif]->haddr[i]; in EthernetOutput() 98 FillOutPacketEthContext(pctx, cur_ts, nif, in EthernetOutput()
|
| H A D | netmap_module.c | 108 netmap_send_pkts(struct mtcp_thread_context *ctxt, int nif) in netmap_send_pkts() argument 115 idx = nif; in netmap_send_pkts() 123 mtcp->nstat.tx_packets[nif]++; in netmap_send_pkts() 124 mtcp->nstat.tx_bytes[nif] += pkt_size + ETHER_OVR; in netmap_send_pkts() 145 netmap_get_wptr(struct mtcp_thread_context *ctxt, int nif, uint16_t pktsize) in netmap_get_wptr() argument 148 int idx = nif; in netmap_get_wptr() 152 netmap_send_pkts(ctxt, nif); in netmap_get_wptr() 256 netmap_dev_ioctl(struct mtcp_thread_context *ctx, int nif, int cmd, void *argp) in netmap_dev_ioctl() argument
|
| H A D | arp.c | 123 ARPOutput(struct mtcp_manager *mtcp, int nif, int opcode, in ARPOutput() argument 132 ETH_P_ARP, nif, dst_haddr, sizeof(struct arphdr), 0); in ARPOutput() 145 arph->ar_sip = g_config.mos->netdev_table->ent[nif]->ip_addr; in ARPOutput() 148 memcpy(arph->ar_sha, g_config.mos->netdev_table->ent[nif]->haddr, arph->ar_hln); in ARPOutput() 185 RequestARP(mtcp_manager_t mtcp, uint32_t ip, int nif, uint32_t cur_ts) in RequestARP() argument 206 ent->nif_out = nif; in RequestARP() 214 ARPOutput(mtcp, nif, arp_op_request, ip, haddr, taddr); in RequestARP() 219 struct arphdr *arph, int nif, uint32_t cur_ts) in ProcessARPRequest() argument 230 ARPOutput(mtcp, nif, arp_op_reply, arph->ar_sip, arph->ar_sha, NULL); in ProcessARPRequest()
|
| H A D | icmp.c | 66 int32_t nif; in ICMPOutput() local 74 nif = GetOutputInterface(daddr); in ICMPOutput() 75 if (nif < 0) in ICMPOutput() 87 RequestARP(mtcp, daddr, nif, mtcp->cur_ts); in ICMPOutput() 100 iph = (struct iphdr *)EthernetOutput(mtcp, pctx, ETH_P_IP, nif, haddr, pktlen, ts); in ICMPOutput()
|
| H A D | pcap_module.c | 68 pcap_send_pkts(struct mtcp_thread_context *ctxt, int nif) in pcap_send_pkts() argument 73 if (ppc->count[nif] > 0) { in pcap_send_pkts() 74 ret = pcap_inject(ppc->handle[nif], ppc->wdata, ppc->phdr.len); in pcap_send_pkts() 77 ppc->count[nif] = 0; in pcap_send_pkts()
|
| H A D | tcp_stream.c | 862 int nif; local 863 nif = GetOutputInterface(addr.sin_addr.s_addr); 864 if (nif < 0) { 868 ret = FreeAddress(ap[nif], &addr);
|
| H A D | api.c | 991 int ret, nif; in mtcp_connect() local 1067 nif = GetOutputInterface(dip); in mtcp_connect() 1068 if (nif < 0) { in mtcp_connect() 1072 ret = FetchAddress(ap[nif], in mtcp_connect()
|
| H A D | config.c | 349 ent->nif = -1; in FeedRouteConfLine() 495 ntohl(walk->ip), ntohl(walk->mask), walk->dev_name, walk->nif); in RouteConfPrint() 1231 rwalk->nif = nwalk->ifindex; in LoadConfigurationLowerHalf()
|
| /mOS-networking-stack/core/src/include/ |
| H A D | eth_out.h | 13 FlushSendChunkBuf(mtcp_manager_t mtcp, int nif); 17 uint16_t h_proto, int nif, unsigned char* dst_haddr, uint16_t iplen,
|
| H A D | io_module.h | 71 int32_t (*send_pkts)(struct mtcp_thread_context *ctx, int nif); 77 int32_t (*dev_ioctl)(struct mtcp_thread_context *ctx, int nif, int cmd, void *argp);
|
| H A D | arp.h | 20 RequestARP(mtcp_manager_t mtcp, uint32_t ip, int nif, uint32_t cur_ts);
|
| H A D | config.h | 97 int nif; member
|
| H A D | mtcp.h | 163 int nif; member
|