Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 1992-1997 Microsoft Corporation
  3. Module Name:
  4. network.h
  5. Abstract:
  6. Contains definitions for manipulating transport structures.
  7. Environment:
  8. User Mode - Win32
  9. Revision History:
  10. 10-Feb-1997 DonRyan
  11. Rewrote to implement SNMPv2 support.
  12. --*/
  13. #ifndef _NETWORK_H_
  14. #define _NETWORK_H_
  15. ///////////////////////////////////////////////////////////////////////////////
  16. // //
  17. // Include files //
  18. // //
  19. ///////////////////////////////////////////////////////////////////////////////
  20. #include "snmppdus.h"
  21. ///////////////////////////////////////////////////////////////////////////////
  22. // //
  23. // Public definitions //
  24. // //
  25. ///////////////////////////////////////////////////////////////////////////////
  26. typedef struct _NETWORK_LIST_ENTRY {
  27. LIST_ENTRY Link;
  28. SOCKET Socket;
  29. struct sockaddr SockAddr;
  30. INT SockAddrLen;
  31. INT SockAddrLenUsed;
  32. WSAOVERLAPPED Overlapped;
  33. DWORD dwStatus;
  34. DWORD dwBytesTransferred;
  35. DWORD dwFlags;
  36. WSABUF Buffer;
  37. LIST_ENTRY Bindings;
  38. LIST_ENTRY Queries;
  39. SNMP_PDU Pdu;
  40. UINT nVersion;
  41. UINT nTransactionId;
  42. AsnOctetString Community;
  43. } NETWORK_LIST_ENTRY, *PNETWORK_LIST_ENTRY;
  44. #define NLEBUFLEN 8192
  45. ///////////////////////////////////////////////////////////////////////////////
  46. // //
  47. // Public prototypes //
  48. // //
  49. ///////////////////////////////////////////////////////////////////////////////
  50. BOOL
  51. IsValidSockAddr(
  52. struct sockaddr *pAddress
  53. );
  54. BOOL
  55. AllocNLE(
  56. PNETWORK_LIST_ENTRY * ppNLE
  57. );
  58. BOOL
  59. FreeNLE(
  60. PNETWORK_LIST_ENTRY pNLE
  61. );
  62. BOOL
  63. LoadIncomingTransports(
  64. );
  65. BOOL
  66. UnloadTransport(
  67. PNETWORK_LIST_ENTRY pNLE
  68. );
  69. BOOL
  70. UnloadIncomingTransports(
  71. );
  72. BOOL
  73. LoadOutgoingTransports(
  74. );
  75. BOOL
  76. UnloadOutgoingTransports(
  77. );
  78. BOOL
  79. UnloadPdu(
  80. PNETWORK_LIST_ENTRY pNLE
  81. );
  82. #endif // _NETWORK_H_