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

Per Ellefsen per.ellefsen at ericsson.com
Wed Oct 22 06:52:25 GMT 2008


 Hi !

Yes, it was something like this I was thinking about.
Will look into this solution.

Thank you very much Mark !

Cheers, Per

-----Original Message-----
From: winpcap-users-bounces at winpcap.org
[mailto:winpcap-users-bounces at winpcap.org] On Behalf Of Mark Bednarczyk
Sent: 22. oktober 2008 05:21
To: winpcap-users at winpcap.org
Subject: RE: [Winpcap-users] Any way to read MTU
fromtheinterface/network-adapter ?

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
>
>


_______________________________________________
Winpcap-users mailing list
Winpcap-users at winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users



More information about the Winpcap-users mailing list