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

VxWorks

开发平台:

C/C++

  1. /* remLib.h - structures for remLib.c */
  2. /* Copyright 1984 - 2001 Wind River Systems, Inc. */
  3. /*
  4. modification history
  5. --------------------
  6. 02d,20feb01,ham  fixed infinite suspending by rcmd() (SPR 62484).
  7. 02c,22sep92,rrr  added support for c++
  8. 02b,15sep92,jcf  added variable declaration.
  9. 02a,04jul92,jcf  cleaned up.
  10. 01i,26may92,rrr  the tree shuffle
  11.   -changed includes to have absolute path from h/
  12. 01h,04oct91,rrr  passed through the ansification filter
  13.   -fixed #else and #endif
  14.   -changed VOID to void
  15.   -changed copyright notice
  16. 01g,11jan91,shl  inlcuded "in.h" for sockaddr_in.
  17. 01f,05oct90,shl  added ANSI function prototypes.
  18.                  made #endif ANSI style.
  19.                  added copyright notice.
  20. 01e,28may88,dnw  removed some status values to hostLib.h.
  21. 01d,01nov87,llk  added S_remLib_HOST_ALREADY_ENTERED.
  22. 01c,10oct86,gae  deleted S_remLib_DIRECTORY_NAME_TOO_BIG, not used anymore;
  23.  spelled S_remLib_ILLEAGAL_INTERNET_ADDRESS correctly.
  24.  moved HOST and HOSTNAME structs to remLib.c for better hiding.
  25.  added conditional INCremLibh.  Defined MAX_IDENTITY_LEN.
  26. 01b,21may86,llk  deleted S_remLib_WRITE_ERROR, not used anymore.
  27. 01a,19sep85,rdc  written.
  28. */
  29. #ifndef __INCremLibh
  30. #define __INCremLibh
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. #include "netinet/in.h"
  35. #define MAX_IDENTITY_LEN 100
  36. /* status messages */
  37. #define S_remLib_ALL_PORTS_IN_USE (M_remLib | 1)
  38. #define S_remLib_RSH_ERROR (M_remLib | 2)
  39. #define S_remLib_IDENTITY_TOO_BIG (M_remLib | 3)
  40. #define S_remLib_RSH_STDERR_SETUP_FAILED (M_remLib | 4)
  41. /* variable declarations */
  42. extern int remLastResvPort;        /* last port num used (from bootroms) */
  43. /* function declarations */
  44. #if defined(__STDC__) || defined(__cplusplus)
  45. extern void     remLibInit (long timeout);
  46. extern STATUS  bindresvport (int sd, struct sockaddr_in *sin);
  47. extern STATUS  iam (char *newUser, char *newPasswd);
  48. extern STATUS  remCurIdSet (char *newUser, char *newPasswd);
  49. extern int  rcmd (char *host, int remotePort, char *localUser,
  50.       char *remoteUser, char *cmd, int *fd2p);
  51. extern int  rresvport (int *alport);
  52. extern void  remCurIdGet (char *user, char *passwd);
  53. extern void  whoami (void);
  54. #else /* __STDC__ */
  55. extern void     remLibInit ();
  56. extern STATUS  bindresvport ();
  57. extern STATUS  iam ();
  58. extern STATUS  remCurIdSet ();
  59. extern int  rcmd ();
  60. extern int  rresvport ();
  61. extern void  remCurIdGet ();
  62. extern void  whoami ();
  63. #endif /* __STDC__ */
  64. #ifdef __cplusplus
  65. }
  66. #endif
  67. #endif /* __INCremLibh */