14 #include <sys/socket.h>
15 #include <sys/queue.h>
16 #include <netinet/in.h>
17 #include <bsd/bitstring.h>
25 #include <sys/types.h>
53 #define CHNL_ENABLE_UDP_CHECKSUM (1 << 0)
56 #define SO_UDP_CHKSUM 1024
57 #define IP_DONTFRAG 1025
83 CNDP_API
void chnl_dump(
const char *msg,
struct chnl *ch);
144 CNDP_API
int chnl_bind(
int cd,
struct sockaddr *addr,
int addrlen);
170 CNDP_API
int chnl_accept(
int cd,
struct sockaddr *sa, socklen_t *addrlen);
CNDP_API int chnl_connect_common(struct chnl *ch, struct in_caddr *to, int32_t tolen)
Common channel connect routine used by protocols.
CNDP_API int chnl_open(const char *str, int flags, chnl_cb_t fn)
CNDP_API int chnl_shutdown(int cd, int how)
Shutdown a channel connection similar to 'shutdown()'.
int(* chnl_cb_t)(int chnl_type, int cd)
CNDP_API int chnl_getchnlname(int cd, struct sockaddr *name, socklen_t *namelen)
CNDP_API int chnl_recv(int cd, pktmbuf_t **mbufs, size_t len)
CNDP_API int chnl_connect(int cd, struct sockaddr *sa, int addrlen)
Connect to a channel, similar to 'connect()'.
CNDP_API int chnl_bind(int cd, struct sockaddr *addr, int addrlen)
Bind an address to a channel similar to 'bind()'.
CNDP_API int chnl_bind_common(struct chnl *ch, struct in_caddr *pAddr, int32_t len, struct pcb_hd *pHd)
Channel Bind common routine used by protocols.
CNDP_API int channel(int domain, int type, int proto, chnl_cb_t cb)
The routine to create a channel structure similar to 'socket()'.
CNDP_API int chnl_listen(int cd, int backlog)
Listen on a channel similar to 'listen()'.
CNDP_API void chnl_dump(const char *msg, struct chnl *ch)
Dump out a channel structure.
CNDP_API int chnl_sendto(int cd, struct sockaddr *sa, pktmbuf_t **mbufs, uint16_t nb_mbufs)
Send data to a channel similar to 'sendto()'.
CNDP_API int chnl_getpeername(int cd, struct sockaddr *sa, socklen_t *salen)
CNDP_API int chnl_accept(int cd, struct sockaddr *sa, socklen_t *addrlen)
Accept on a channel similar to 'accept()'.
CNDP_API int chnl_send(int cd, pktmbuf_t **mbufs, uint16_t nb_mbufs)
CNDP_API int chnl_close(int cd)