distIfLib.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:2k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* distIfLib.h - defines and protypes for interface adapters (VxFusion) */
  2. /* Copyright 1999 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01d,24may99,drm  adding vxfusion prefix to vxfusion related includes
  7. 01c,22feb99,drm  removed distNetInput()
  8. 01b,12aug98,drm  added distNetInput() to function prototypes
  9. 01a,01sep97,ur   written.
  10. */
  11. #ifndef __INCdistIfLibh
  12. #define __INCdistIfLibh
  13. #include "vxWorks.h"
  14. #include "vxfusion/distNodeLib.h"
  15. #include "vxfusion/distTBufLib.h"
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif /* __cplusplus */
  19. /* DIST_IF is a structure which is used to communicate information about
  20.  * an interface such as MTU size to the upper layers. */
  21. /* defines */
  22. #define DIST_IF_NAME 
  23. (pDistIf->distIfName)          /* macro to access name field */
  24. #define DIST_IF_MTU 
  25. (pDistIf->distIfMTU)           /* macro to access MTU size field */ 
  26. #define DIST_IF_HDR_SZ 
  27. (pDistIf->distIfHdrSize)       /* macro to access network hdr size field */
  28. #define DIST_IF_BROADCAST_ADDR 
  29. (pDistIf->distIfBroadcastAddr) /* macro to access broadcast addr field */
  30. #define DIST_IF_RNG_BUF_SZ 
  31. (pDistIf->distIfRngBufSz)      /* macro to access ring buffer size field */
  32. #define DIST_IF_MAX_FRAGS 
  33. (pDistIf->distIfMaxFrags)      /* macro to access max fragments field */
  34. #define DIST_IF_FILTERADD(mask) 
  35. ((pDistIf->distIfIoctl) (IOFILTERADD, (mask))) /* macro to call IOCTL */
  36. #define DIST_IF_SEND(destId, pTBuf, prio) 
  37. ((pDistIf->distIfSend) ((destId), (pTBuf), (prio))) /* macro to call send */
  38. /* typedefs */
  39. typedef struct   /* DIST_IF */
  40. {
  41. char         *distIfName;         /* name of the interface */
  42. int          distIfMTU;           /* MTU size of interface's transport */
  43. int          distIfHdrSize;       /* network header size */
  44. DIST_NODE_ID distIfBroadcastAddr; /* broadcast address for the interface */
  45. short        distIfRngBufSz;      /* # buffers in sliding window protocol */
  46. short        distIfMaxFrags;      /* max frags a msg can be broken into */ 
  47. int (*distIfIoctl) (int fnc, ...); /* adapter IOCTL function */
  48. STATUS (*distIfSend) (DIST_NODE_ID destId, DIST_TBUF *pTBuf, int prio);
  49.                                            /* send function of the adapter */ 
  50. } DIST_IF;
  51. extern DIST_IF *pDistIf;             /* ptr to DIST_IF struct in adapter */
  52. #ifdef __cplusplus
  53. }
  54. #endif /* __cplusplus */
  55. #endif /* __INCdistIfLibh */