[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

8688.0. "ioctls for network interfaces: SIOCSPHYSADDR, SIOCADDMULTI, and SIOCDELMULTI" by CECMOW::RAIKO () Tue Feb 04 1997 02:08

Hi,

I've got few questions regarding ioctls listed in the title for DUNIX V4.0

1. I didn't find any useful information on these ioctls. It seems like they
   are documented in man pages (le(7), ln(7), tu(7), etc.) only. But no
   description of arguments that should be passed for them is present there.
   So, where can I find useful info ?

2. SIOCSPHYSADDR is defined in <sys/ioctl.h> as

	#define SIOCSPHYSADDR   _IOWR('i', 63, struct ifdevea)
   
   I've tried to pass pointer to ifdevea and have encountered some strange 
   behaviour. ioctls returns either EIO or ENOBUFS and changes Ethernet address
   of the interface. New address is taken from default_pa[2...5] and
   current_pa[0...1]. So, perhaps, ifreq should be passed to SIOCSPHYSADDR
   rather than ifdevea, but it's quite unclear for me what is the address
   family I should pass ?

3. How should ifreq be filled for SIOCADDMULTI and SIOCDELMULTI ?

Regards,
Gleb Raiko.
T.RTitleUserPersonal
Name
DateLines
8688.1netrix.lkg.dec.com::thomasThe Code WarriorTue Feb 04 1997 09:219
2) SIOCSPHYSADDR actually gets an ifreq passed in.  The new address is in
   the first 6 byte of ifreq.ifr_addr.sa_data.

3) Use an ifreq.  Set ifr_addr.sa_family to AF_UNSPEC and put multicast in
   the first six bytes of ifr_addr.sa_data.  Note that if the process exits,
   the enabled multicasts are not automatically disabled.

Note that if you are using DLI, you must use the DLI_MULTICAST setsockopt
(and DLI will clean up the multicasts).