[Winpcap-users] Any way to read MTU from theinterface/network-adapter ?

Mark Bednarczyk voytechs at yahoo.com
Wed Oct 22 03:21:25 GMT 2008


You can use Microsoft's Ip Helper API. Basic steps are

1) GetInterfaceInfo() - needs to be called twice per MS documentation

http://msdn.microsoft.com/en-us/library/aa365947(VS.85).aspx

2) iterate over IP_INTERFACE_INFO.Adapter[] member and until you find the
index of the interface you are looking. You have to compare interfaces names
as strings :(

3) Once you have the index number do a call to GetIfEntry() to get MIB_IFROW
structure as a result

http://msdn.microsoft.com/en-us/library/aa365939(VS.85).aspx

and lookup the member MIB_IFROW.dwMtu

Cheers,
mark...

> -----Original Message-----
> From: winpcap-users-bounces at winpcap.org
> [mailto:winpcap-users-bounces at winpcap.org] On Behalf Of Per Ellefsen
> Sent: Tuesday, October 21, 2008 9:16 AM
> To: winpcap-users at winpcap.org
> Subject: [Winpcap-users] Any way to read MTU from
> theinterface/network-adapter ?
>
> Hi !
>
> I am using WinPcap for both send and receive traffic towards
> the network adapter.
> Does anybody know if it is possible to read out the MTU size
> configured for the adapter ?
> ....using WinPcap or any system-call ?
>
> BR Per
>
>




More information about the Winpcap-users mailing list