[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch] multiple interfaces and dummy device
From: |
Marcus Brinkmann |
Subject: |
[patch] multiple interfaces and dummy device |
Date: |
Sun, 1 Oct 2000 16:26:36 +0200 |
User-agent: |
Mutt/1.1.4i |
Hi,
I redid the patch for multiple interfaces and dummy devices I wrote yesterday,
so that it now uses seperate linked lists to store ethernet and dummy devices,
and checks the linked list dev_base in find_device and enumerate_devices.
As before, find_device and enumerate_device don't include the loopback
interface. If this is desired, it can easily be enabled, though. However, I
wanted to minimize the impact of my changes on existing setups, and only
extend it.
With the patch, we support an arbitrary number of ethernet and dummy devices.
Please let me know if I can apply this when it is sufficiently tested,
and if not, what's left to do.
Thanks,
Marcus
2000-10-01 Marcus Brinkmann <marcus@gnu.org>
* Makefile (SRCS): Add dummy.c
* dummy.c: New file.
* ethernet.c: Moved ETHER_PORT, READPT, READPTNAME to ...
(struct ether_device): ... here. New struct.
ETHER_DEV is now a pointer to a struct ether_device.
(ethernet_demuxer): New variables edev, dev.
Iterate over linked list ETHER_DEV to find correct
readptname. Use dev instead ETHER_DEV for socket buffer
manipulation.
(ethernet_open): New variable edev.
Iterate over ETHER_DEV to find correct dev.
Use members of edev instead global variables.
(ethernet_xmit): New variable edev. Iterate over ETHER_DEV
to find correct dev. Use member of edev instead global variable
ETHER_PORT.
(setup_ethernet_device): New output argument DEVICE.
New variables edev and dev. Allocate memory for edev, add it to
the head of ETHER_DEV. Use dev instead ETHER_DEV.
Use members of edev instead global variables.
* main.c: ALREADY_OPEN removed.
(find_device): Fix comment. Redone to work with multiple
devices by iterating over DEV_BASE.
(enumerate_device): Likewise.
* pfinet.h: Add new argument to prototype of setup_ethernet_device.
Add prototype for setup_dummy_device.
Remove prototype for ETHER_DEV.
Add prototype for DEV_BASE.
--
`Rhubarb is no Egyptian god.' Debian http://www.debian.org Check Key server
Marcus Brinkmann GNU http://www.gnu.org for public PGP Key
Marcus.Brinkmann@ruhr-uni-bochum.de, marcus@gnu.org PGP Key ID 36E7CD09
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/ brinkmd@debian.org
pfinet.diff
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [patch] multiple interfaces and dummy device,
Marcus Brinkmann <=