Форум: "Сети";
Текущий архив: 2002.04.22;
Скачать: [xml.tar.bz2];
ВнизСнова сетевой трафик Найти похожие ветки
← →
rambo69 (2002-02-08 20:32) [0]Господа! Ну, помогите решить проблему перехвата (чтения) сетевого трафика. Можно ли обойтися здесь без драйвера сетевой карты? Может есть какие API или мессаги?
← →
VuDZ (2002-02-09 01:20) [1]GetIfEntry
The GetIfEntry function retrieves information for the specified interface on the local computer.
DWORD GetIfEntry(
PMIB_IFROW pIfRow // pointer to interface entry
);
Parameters
pIfRow
[in] Pointer to a MIB_IFROW structure that receives information for an interface on the local computer. Set the dwIndex member of MIB_IFROW to the index of the interface for which to retrieve information.
Return Values
If the function succeeds, the return value is NO_ERROR.
If the function fails, use FormatMessage to obtain the message string for the returned error.
=====================================================
MIB_IFROW
The MIB_IFROW structure stores information about a particular interface.
typedef struct _MIB_IFROW {
WCHAR wszName[MAX_INTERFACE_NAME_LEN];
DWORD dwIndex; // index of the interface
DWORD dwType; // type of interface
DWORD dwMtu; // max transmission unit
DWORD dwSpeed; // speed of the interface
DWORD dwPhysAddrLen; // length of physical address
BYTE bPhysAddr[MAXLEN_PHYSADDR]; // physical address of adapter
DWORD dwAdminStatus; // administrative status
DWORD dwOperStatus; // operational status
DWORD dwLastChange; // last time operational status changed
DWORD dwInOctets; // octets received
DWORD dwInUcastPkts; // unicast packets received
DWORD dwInNUcastPkts; // non-unicast packets received
DWORD dwInDiscards; // received packets discarded
DWORD dwInErrors; // erroneous packets received
DWORD dwInUnknownProtos; // unknown protocol packets received
DWORD dwOutOctets; // octets sent
DWORD dwOutUcastPkts; // unicast packets sent
DWORD dwOutNUcastPkts; // non-unicast packets sent
DWORD dwOutDiscards; // outgoing packets discarded
DWORD dwOutErrors; // erroneous packets sent
DWORD dwOutQLen; // output queue length
DWORD dwDescrLen; // length of bDescr member
BYTE bDescr[MAXLEN_IFDESCR]; // interface description
} MIB_IFROW,*PMIB_IFROW;
Members
wszName[MAX_INTERFACE_NAME_LEN]
Pointer to a Unicode string that contains the name of the interface.
dwIndex
Specifies the index that identifies the interface.
dwType
Specifies the type of interface.
dwMtu
Specifies the Maximum Transmission Unit (MTU).
dwSpeed
Specifies the speed of the interface in bits per second.
dwPhysAddrLen
Specifies the length of the physical address specified by the bPhysAddr member.
bPhysAddr[MAXLEN_PHYSADDR]
Specifies the physical address of the adapter for this interface.
dwAdminStatus
Specifies the interface is administratively enabled or disabled.
dwOperStatus
Specifies the operational status of the interface. This member can be one of the following values.
MIB_IF_OPER_STATUS_NON_OPERATIONAL
MIB_IF_OPER_STATUS_UNREACHABLE
MIB_IF_OPER_STATUS_DISCONNECTED
MIB_IF_OPER_STATUS_CONNECTING
MIB_IF_OPER_STATUS_CONNECTED
MIB_IF_OPER_STATUS_OPERATIONAL
dwLastChange
Specifies the last time the operational status changed.
dwInOctets
Specifies the number of octets of data received through this interface.
dwInUcastPkts
Specifies the number of unicast packets received through this interface.
dwInNUcastPkts
Specifies the number of non-unicast packets received through this interface. Broadcast and multicast packets are included.
dwInDiscards
Specifies the number of incoming packets that were discarded even though they did not have errors.
dwInErrors
Specifies the number of incoming packets that were discarded because of errors.
dwInUnknownProtos
Specifies the number of incoming packets that were discarded because the protocol was unknown.
dwOutOctets
Specifies the number of octets of data sent through this interface.
dwOutUcastPkts
Specifies the number of unicast packets sent through this interface.
dwOutNUcastPkts
Specifies the number of non-unicast packets sent through this interface. Broadcast and multicast packets are included.
dwOutDiscards
Specifies the number of outgoing packets that were discarded even though they did not have errors.
dwOutErrors
Specifies the number of outgoing packets that were discarded because of errors.
dwOutQLen
Specifies the output queue length.
dwDescrLen
Specifies the length of the bDescr member.
bDescr[MAXLEN_IFDESCR]
Contains a description of the interface.
Страницы: 1 вся ветка
Форум: "Сети";
Текущий архив: 2002.04.22;
Скачать: [xml.tar.bz2];
Память: 0.46 MB
Время: 0.006 c