Xref: utzoo comp.unix.internals:1903 comp.unix.programmer:926 comp.unix.questions:28300 comp.unix.wizards:23909 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!elroy.jpl.nasa.gov!jarthur!ucivax!mziober From: mziober@raspail.ics.uci.edu (Michael A. Ziober) Newsgroups: comp.unix.internals,comp.unix.programmer,comp.unix.questions,comp.unix.wizards Subject: questions about 4.3BSD struct ifnet.if_addrlist Message-ID: <27A5E3C0.11971@ics.uci.edu> Date: 29 Jan 91 21:06:08 GMT Organization: UC Irvine Department of ICS Lines: 42 Nntp-Posting-Host: raspail.ics.uci.edu (I'm having a little trouble getting this off campus. I apologize if you have to see this more than once.) Hi, I hope that someone out there can answer a few questions for me. I am working on a project which requires connecting IP to a new network interface. In order to achieve this we are using the following scheme: - We have a pseudo-device (we call it rawpacket) that receives an IP-packet and sends it to a user daemon by calling raw_input() (using raw socket). - The user daemon then send the packet to a device driver that handles placing the packet on the network. - Incoming packets are picked up from the device driver by the daemon which writes them on the raw socket. - The socket's pr_output() routine, rawpacket_output(), calls IF_ENQUEUE to pass the data up to IP. When implementing the pseudo-device, we had some questions about the Network interface data structures (described on page 316 of the book "The Design and Implementation of the 4.3BSD UNIX Operating System"). The questions are related to the address list field. I will put the questions in an itemized form. - Does my procedure rpattach() (When attaching the pseudo-device to the system) initialize this address list? - If so, what should it be? Should it be initialized to NULL? - If not, who should do the initialization? - When using this field in the structure (for example to send a packet) how do I find the appropriate address to use from this list? - In the routine rpioctl() (for the SIOCSIFADDR and SIOCSDSTADDR commands), does it add new address to the address list? - Does it replace any existing entries by matching address families? In summary, we need to know how this field address list is handled. Who initilizes it? Who modifies it? How is it done? How it it maintained? Are there any useful support routines? Thanks for any help, Michael Ziober