Subject: setting OSI NSAP address
To: None <firstname.lastname@example.org>
From: Takashi Ikeda <email@example.com>
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
but result is like this:
ac0: flags=a831<UP,POINTOPOINT,NOTRAILERS,SIMPLEX,LINK1,MULTICAST> mtu
inet 192.168.11.2 --> 192.168.11.3 netmask 0xffffff00
iso 18.104.22.168.22.214.171.124.0.0.0.0.0.0.0.0.0.0.0.0 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.