Home
last modified time | relevance | path

Searched refs:nif (Results 1 – 15 of 15) sorted by relevance

/mOS-networking-stack/core/src/
H A Dip_out.c14 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 Ddpdk_module.c229 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 Deth_out.c46 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 Dnetmap_module.c108 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 Darp.c123 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 Dicmp.c66 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 Dpcap_module.c68 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 Dtcp_stream.c862 int nif; local
863 nif = GetOutputInterface(addr.sin_addr.s_addr);
864 if (nif < 0) {
868 ret = FreeAddress(ap[nif], &addr);
H A Dapi.c991 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 Dconfig.c349 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 Deth_out.h13 FlushSendChunkBuf(mtcp_manager_t mtcp, int nif);
17 uint16_t h_proto, int nif, unsigned char* dst_haddr, uint16_t iplen,
H A Dio_module.h71 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 Darp.h20 RequestARP(mtcp_manager_t mtcp, uint32_t ip, int nif, uint32_t cur_ts);
H A Dconfig.h97 int nif; member
H A Dmtcp.h163 int nif; member