Subject: setting OSI NSAP address
To: None <>
From: Takashi Ikeda <>
List: netbsd-users
Date: 01/10/1999 12:13:42
Are anyone know about setting OSI-NSAP address on NetBSD?

I tried to set NSAP address with 20 bytes on a interface like this:

my-PC>ifconfig ac0 iso
47.0000.0005.0000.0000.0001.0001.0200.a20c.0b02.00 netmask

but result is like this:

my-PC>ifconfig -a
        inet --> netmask 0xffffff00
        iso  netmask

Note: ac is ATM interface which is not NetBSD original.  The basic
result is the same when ethernet interface is chosen, and as I described
in below, which network device is chosen seems not to be related to this
Looking source codes, I know:
1) ifconfig command is using SIOCAIFADDR of ioctl command to set NSAP
2)The function "syscall" in sys/arch/i386/i386/trap.c copies the system
call parameter into kernel buffer on line 646 with "copyin" call, and
dispatches the function.
3)Proceeding if_ioctl function,
and the size of the user buffer (i.e system call parameter) copied is
defined in ioctl command. In case of SIOCAIFADDR, that is the size of
"struct ifaliasreq", but it has not enough size to handle 20byte NSAP or
"struct sockaddr_siso". Therefore I got above result, lower bit of
address and netmask are all null.
I'v confirmed to make new ioctl command with larger size and complete
setting the whole address.

Is this a bug of NetBSD? or did I do something wrong ?

Oh, sorry. I forgot to write my OS information.

I'm using NetBSD 1.3.1 i386-poring. I did some changings including
ATM-NIC driver implementation.

Takashi Ikeda