From: Michael Richardson <mcr@sa...> - 2002-07-13 18:48:47
-----BEGIN PGP SIGNED MESSAGE-----
Jeff, As discussed before, I'm trying to merge my uml_netjig and
uml_switch. I hope to wind up with a directory with two programs, uml_netjig
and uml_switch which do argument processing, and then call common routines.
There are a couple of questions:
else if(fds[i].fd == data_fd) handle_sock_data(data_fd, hub);
else if(fds[i].fd == tap_fd) handle_tap_data(tap_fd, hub);
new = handle_port(fds[i].fd);
if(new) new_port(fds[i].fd, data_fd);
handle_port seems to search the list of control FDs for each port.
(I think that previous versions called these "connections") If it is a
control port, then it calls service_port(), which reads one byte (but,
since it is a datagram socket, I guess one datagram), and discards it.
If it wasn't a control socket, then it calls new_port(), which then tries to
read a *req from the port. So, the logic seems to be that if it isn't a
control port (which we now ignore, or at least, listen to only looking for
EOF), then it must be data.
Is this understanding correct?
] ON HUMILITY: to err is human. To moo, bovine. | firewalls [
] Michael Richardson, Sandelman Software Works, Ottawa, ON |net architect[
] mcr@... http://www.sandelman.ottawa.on.ca/ |device driver[
] panic("Just another NetBSD/notebook using, kernel hacking, security guy"); [
-----BEGIN PGP SIGNATURE-----
Comment: Finger me for keys
-----END PGP SIGNATURE-----
Get latest updates about Open Source Projects, Conferences and News.