windows-nt/Source/XPSP1/NT/net/snmp/newagent/inc/network.h
2020-09-26 16:20:57 +08:00

113 lines
2.6 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*++
Copyright (c) 1992-1997 Microsoft Corporation
Module Name:
network.h
Abstract:
Contains definitions for manipulating transport structures.
Environment:
User Mode - Win32
Revision History:
10-Feb-1997 DonRyan
Rewrote to implement SNMPv2 support.
--*/
#ifndef _NETWORK_H_
#define _NETWORK_H_
///////////////////////////////////////////////////////////////////////////////
// //
// Include files //
// //
///////////////////////////////////////////////////////////////////////////////
#include "snmppdus.h"
///////////////////////////////////////////////////////////////////////////////
// //
// Public definitions //
// //
///////////////////////////////////////////////////////////////////////////////
typedef struct _NETWORK_LIST_ENTRY {
LIST_ENTRY Link;
SOCKET Socket;
struct sockaddr SockAddr;
INT SockAddrLen;
INT SockAddrLenUsed;
WSAOVERLAPPED Overlapped;
DWORD dwStatus;
DWORD dwBytesTransferred;
DWORD dwFlags;
WSABUF Buffer;
LIST_ENTRY Bindings;
LIST_ENTRY Queries;
SNMP_PDU Pdu;
UINT nVersion;
UINT nTransactionId;
AsnOctetString Community;
} NETWORK_LIST_ENTRY, *PNETWORK_LIST_ENTRY;
#define NLEBUFLEN 8192
///////////////////////////////////////////////////////////////////////////////
// //
// Public prototypes //
// //
///////////////////////////////////////////////////////////////////////////////
BOOL
IsValidSockAddr(
struct sockaddr *pAddress
);
BOOL
AllocNLE(
PNETWORK_LIST_ENTRY * ppNLE
);
BOOL
FreeNLE(
PNETWORK_LIST_ENTRY pNLE
);
BOOL
LoadIncomingTransports(
);
BOOL
UnloadTransport(
PNETWORK_LIST_ENTRY pNLE
);
BOOL
UnloadIncomingTransports(
);
BOOL
LoadOutgoingTransports(
);
BOOL
UnloadOutgoingTransports(
);
BOOL
UnloadPdu(
PNETWORK_LIST_ENTRY pNLE
);
#endif // _NETWORK_H_