Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Nov 1999 14:49:39 -0800
From:      "Justin C. Walker" <justin@apple.com>
To:        freebsd-net@freebsd.org
Subject:   Question about netmask retrieval
Message-ID:  <199911142249.OAA00738@walker3.apple.com>

next in thread | raw e-mail | index | archive | help
This is a quickie, I think: in doing the obvious (to me) thing to  
retrieve the netmask associated with an IP address assigned to an  
interface, I use SIOCGIFNETMASK with an ifreq struct that I get from  
SIOCGIFCONF.  If there are aliases assigned, I see the netmask  
associated with the "primary" (?) IP address, rather than that of the  
alias address in question (the one specified in the ifreq).

This seems to be caused by the fact that the kernel code find the  
"first" ifaddr struct for the interface, and stops looking.

Bug?  Feature?  I know there are alternative ways to do this, but  
I'm curious about the reason for this behavior.

Regards,

Justin



--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics       |
Manager, CoreOS Networking            |   Men are from Earth.
Apple Computer, Inc.                  |   Women are from Earth.
2 Infinite Loop                       |       Deal with it.
Cupertino, CA 95014                   |
*-------------------------------------*-------------------------------*


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911142249.OAA00738>