This patch switches the MINIX3 ethernet driver stack from a port-based
model to an instance-based model. Each ethernet driver instance is now responsible for exactly one network interface card. The port field in /etc/inet.conf now acts as an instance field instead. This patch also updates the data link protocol. This update: - eliminates the concept of ports entirely; - eliminates DL_GETNAME entirely; - standardizes on using m_source for IPC and DL_ENDPT for safecopies; - removes error codes from TASK/STAT replies, as they were unused; - removes a number of other old or unused fields; - names and renames a few other fields. All ethernet drivers have been changed to: - conform to the new protocol, and exactly that; - take on an instance number based on a given "instance" argument; - skip that number of PCI devices in probe iterations; - use config tables and environment variables based on that number; - no longer be limited to a predefined maximum of cards in any way; - get rid of any leftover non-safecopy support and other ancient junk; - have a correct banner protocol figure, or none at all. Other changes: * Inet.conf is now taken to be line-based, and supports #-comments. No existing installations are expected to be affected by this. * A new, select-based asynchio library replaces the old one. Kindly contributed by Kees J. Bot. * Inet now supports use of select() on IP devices. Combined, the last two changes together speed up dhcpd considerably in the presence of multiple interfaces. * A small bug has been fixed in nonamed.
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
|
||||
#define PORT 6060L
|
||||
|
||||
int listen(long port) {
|
||||
int my_listen(long port) {
|
||||
|
||||
char *tcp_device;
|
||||
int netfd;
|
||||
@@ -87,7 +87,7 @@ int main(int argc,char *argv[]) {
|
||||
int ret;
|
||||
fd_set fds_read;
|
||||
|
||||
if ((fd = listen(PORT)) < 0) {
|
||||
if ((fd = my_listen(PORT)) < 0) {
|
||||
exit(-1);
|
||||
}
|
||||
printf("Waiting for messages on port: %ld\n", PORT);
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#define PORT 6060L
|
||||
|
||||
int listen(long port) {
|
||||
int my_listen(long port) {
|
||||
|
||||
char *tcp_device;
|
||||
int netfd;
|
||||
@@ -90,7 +90,7 @@ int main(int argc,char *argv[]) {
|
||||
fd_set fds_read;
|
||||
struct timeval timeout;
|
||||
|
||||
if ((fd = listen(PORT)) < 0) {
|
||||
if ((fd = my_listen(PORT)) < 0) {
|
||||
exit(-1);
|
||||
}
|
||||
printf("Waiting for messages on port: %ld\n", PORT);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#define PORT 6060L
|
||||
|
||||
int listen(long port) {
|
||||
int my_listen(long port) {
|
||||
|
||||
char *tcp_device;
|
||||
int netfd;
|
||||
@@ -105,7 +105,7 @@ int main(int argc,char *argv[]) {
|
||||
int ret;
|
||||
fd_set fds_excep;
|
||||
|
||||
if ((fd = listen(PORT)) < 0) {
|
||||
if ((fd = my_listen(PORT)) < 0) {
|
||||
exit(-1);
|
||||
}
|
||||
printf("Waiting for messages on port: %ld\n", PORT);
|
||||
|
||||
Reference in New Issue
Block a user