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

VxWorks

开发平台:

C/C++

  1. /* if_sm.h - WRS backplane driver header file */
  2. /* Copyright 1984-1992 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 01f,22sep92,rrr  added support for c++
  7. 01e,16jun92,elh  clean up.  Added numLoan to smIfAttach.
  8. 01d,02jun92,elh  the tree shuffle
  9. 01c,27may92,elh  Incorperated the changes caused from restructuring the
  10.  shared memory libraries.
  11. 01b,10apr92,elh  added masterAddr to store master address.
  12. 01a,17nov90,elh  written.
  13. */
  14. #ifndef __INCif_smh
  15. #define __INCif_smh
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. #include "smPktLib.h"
  20. /* defines */
  21. #define xs_if xs_ac.ac_if /* interface structure */
  22. #define xs_enaddr xs_ac.ac_enaddr /* ethernet address */
  23. #define smIfInputCount(xs, cpu) 
  24. (xs)->smPktDesc.cpuLocalAdrs [(cpu)].inputList.count
  25. /* typedefs */
  26. #if ((CPU_FAMILY==I960) && (defined __GNUC__))
  27. #pragma align 1                 /* tell gcc960 not to optimize alignments */
  28. #endif  /* CPU_FAMILY==I960 */
  29. typedef struct sm_softc
  30.     {
  31.     struct arpcom xs_ac; /* common ethernet structure*/
  32.     SM_PKT_DESC smPktDesc; /* shared mem packet desc */
  33.     int taskRecvActive; /* recv task active */
  34.     u_long masterAddr; /* master address */
  35.     int bufFree; /* buffer loaning info */
  36.     } SM_SOFTC;
  37. #if ((CPU_FAMILY==I960) && (defined __GNUC__))
  38. #pragma align 0                 /* turn off alignment requirement */
  39. #endif  /* CPU_FAMILY==I960 */
  40. /* function prototypes */
  41. #if defined(__STDC__) || defined(__cplusplus)
  42. extern STATUS smIfAttach (int unit, SM_ANCHOR * pAnchor, int maxInputPkts,
  43.   int intType, int intArg1, int intArg2, int intArg3,
  44.   int ticksPerBeat, int numLoan);
  45. extern void smIfInput (SM_SOFTC * xs);
  46. extern void smIfLoanReturn (SM_SOFTC * xs, SM_PKT * pPkt);
  47. #else
  48. extern STATUS  smIfAttach ();
  49. extern void smIfInput ();
  50. extern void smIfLoanReturn ();
  51. #endif /* __STDC__ */
  52. #ifdef __cplusplus
  53. }
  54. #endif
  55. #endif /* __INCif_smh */