1 #ifndef __ETH_OUT_H_ 2 #define __ETH_OUT_H_ 3 4 #include <stdint.h> 5 6 #include "mtcp.h" 7 #include "tcp_stream.h" 8 #include "mos_api.h" 9 10 #define MAX_SEND_PCK_CHUNK 64 11 12 #if !(E_PSIO || USE_CHUNK_BUF) 13 extern inline void 14 InitWriteChunks(struct ps_handle* handle, struct ps_chunk *w_chunk); 15 16 int 17 FlushWriteBuffer(struct mtcp_thread_context *ctx, int ifidx); 18 19 #else 20 21 int 22 FlushSendChunkBuf(mtcp_manager_t mtcp, int nif); 23 24 #endif 25 26 uint8_t * 27 EthernetOutput(struct mtcp_manager *mtcp, struct pkt_ctx *pctx, 28 uint16_t h_proto, int nif, unsigned char* dst_haddr, uint16_t iplen, 29 uint32_t cur_ts); 30 31 void 32 ForwardEthernetFrame(struct mtcp_manager *mtcp, struct pkt_ctx *pctx); 33 34 #endif /* __ETH_OUT_H_ */ 35