Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Сети";
Текущий архив: 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
6-69936
Borisb69
2002-02-06 11:16
2002.04.22
сетевой трафик


1-69882
koks
2002-04-05 15:26
2002.04.22
Подскажите, где можно найти хорошие коллекции битмапов...


14-70010
Nikolay
2002-03-15 12:11
2002.04.22
Где можно почитать про итерацию?


1-69799
Dimedrol
2002-04-09 10:32
2002.04.22
Своя внутренняя переключалка клавиатуры...


1-69810
VictorT
2002-04-09 17:47
2002.04.22
Консольное приложение





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский