Operating System - HP-UX
1834401 Members
2901 Online
110067 Solutions
New Discussion

Getting network card MTU using ioctl

 
SOLVED
Go to solution
Prakash Achuthan
Occasional Advisor

Getting network card MTU using ioctl

Hi,

How do i get the MTU of my network interface card using ioctl ?
I tried a lot but I could get it right.

This is the first time I am using ioctl.

Thanks in advance,
Prakash
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: Getting network card MTU using ioctl

Hi:

If you want to interrogage the MTU networking size:

# lanadmin -m [ppid|nmid]

If you want to set it (by lan):

# lanadmin -M 1500 [ppid|nmid]

Regards!

...JRF...
Prakash Achuthan
Occasional Advisor

Re: Getting network card MTU using ioctl

Hi,

I want to do it from within my C++ code using ioctl sys call.

Thanks,
Prakash
harry d brown jr
Honored Contributor

Re: Getting network card MTU using ioctl





The Document

http://www.docs.hp.com/hpux/pdf/B2355-90669.pdf

has a structure called hw_ift_t which contains mtu size.


live free or die
harry
Live Free or Die
Pal Szabo_1
Valued Contributor
Solution

Re: Getting network card MTU using ioctl

Hi!

I suggest using DLPI
http://docs.hp.com/hpux/onlinedocs/B2355-90139/B2355-90139.html

The DL_HP_PPA_ACK primitive is used to query the networking information of the card.

I suggest to aviod using ioctl system call,because
DLPI is an industry standard
and use only one devices file,

But if you want to use it
try this:
LLA to DLPI migration guide
ioctl requests

http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90138/B2355-90138_top.html&con=/hpux/onlinedocs/B2355-90138/00/00/7-con.html&toc=/hpux/onlinedocs/B2355-90138/00/00/7-toc.html&searchterms=DLPI&queryid=20020128-071716



Sample program:
http://docs.hp.com/cgi-bin/onlinedocs.py?mpn=B2355-90138&service=hpux&path=../B2355-90138/00/00/12&title=LLA%20to%20DLPI%20Migration%20Guide



Regards:
Paul