zbufSockLib.h
资源名称:ixp425BSP.rar [点击查看]
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:2k
源码类别:
VxWorks
开发平台:
C/C++
- /* zbufSockLib.h - zeroCopy buffer socket interface library header */
- /* Copyright 1984-1994 Wind River Systems, Inc. */
- /*
- modification history
- --------------------
- 01a,08nov94,dzb written.
- */
- #ifndef __INCzbufSockLibh
- #define __INCzbufSockLibh
- #ifdef __cplusplus
- extern "C" {
- #endif
- /* includes */
- #include "zbufLib.h"
- #include "sys/socket.h"
- /* typedefs */
- #if ((CPU_FAMILY==I960) && (defined __GNUC__))
- #pragma align 1 /* tell gcc960 not to optimize alignments */
- #endif /* CPU_FAMILY==I960 */
- typedef struct /* ZBUF_SOCK_FUNC */
- {
- FUNCPTR libInitRtn; /* zbufLibInit() */
- FUNCPTR sendRtn; /* zbufSockSend() */
- FUNCPTR sendtoRtn; /* zbufSockSendto() */
- FUNCPTR bufSendRtn; /* zbufSockBufSend() */
- FUNCPTR bufSendtoRtn; /* zbufSockBufSend() */
- FUNCPTR recvRtn; /* zbufSockRecv() */
- FUNCPTR recvfromRtn; /* zbufSockRecvfrom() */
- } ZBUF_SOCK_FUNC;
- #if ((CPU_FAMILY==I960) && (defined __GNUC__))
- #pragma align 0 /* turn off alignment requirement */
- #endif /* CPU_FAMILY==I960 */
- /* function declarations */
- #if defined(__STDC__) || defined(__cplusplus)
- extern STATUS zbufSockLibInit (void);
- extern int zbufSockSend (int s, ZBUF_ID zbufId, int zbufLen, int flags);
- extern int zbufSockSendto (int s, ZBUF_ID zbufId, int zbufLen, int flags,
- struct sockaddr *to, int tolen);
- extern int zbufSockBufSend (int s, char *buf, int bufLen,
- VOIDFUNCPTR freeRtn, int freeArg, int flags);
- extern int zbufSockBufSendto (int s, char *buf, int bufLen,
- VOIDFUNCPTR freeRtn, int freeArg, int flags,
- struct sockaddr *to, int tolen);
- extern ZBUF_ID zbufSockRecv (int s, int flags, int *pLen);
- extern ZBUF_ID zbufSockRecvfrom (int s, int flags, int *pLen,
- struct sockaddr *from, int *pFromLen);
- #else /* __STDC__ */
- extern STATUS zbufSockLibInit ();
- extern int zbufSockSend ();
- extern int zbufSockSendto ();
- extern int zbufSockBufSend ();
- extern int zbufSockBufSendto ();
- extern ZBUF_ID zbufSockRecv ();
- extern ZBUF_ID zbufSockRecvfrom ();
- #endif /* __STDC__ */
- #ifdef __cplusplus
- }
- #endif
- #endif /* __INCzbufSockLibh */