switch->netjig patch 3
Jeff, this patch (also http://www.sandelman.ca/tmp/jig3.patch) adds the file nethub.c, and moves additional code from uml_switch.c/port.c to nethub.c. (Sorry, this moves code from port.c that jig2 moves to there. My mistake, I copied too much)
Again, no new functionality.
uml_router/Makefile +2 -2
@@ -1,8 +1,8 @@ TUNTAP = $(shell [ -e /usr/include/linux/if_tun.h ] && echo -DTUNTAP) -OBJS = hash.o port.o uml_switch.o +OBJS = hash.o port.o uml_switch.o nethub.o BIN = uml_switch -CFLAGS = -g -Wall $(TUNTAP) +CFLAGS = -g -Wall $(TUNTAP) BIN_DIR ?= /usr/bin
uml_router/nethub.c +221 -0
221 lines not on this page · raw message
uml_router/nethub.h +6 -0
@@ -103,6 +103,12 @@extern struct sockaddr_un data_sun;extern void cleanup (void ); +extern void bind_sockets (int ctl_fd,const char *ctl_name,int data_fd); +void bind_sockets_v0 (int ctl_fd,const char *ctl_name, +int data_fd,const char *data_name); +void add_fd (int fd); +void accept_connection (int fd); +void close_descriptor (int fd);#define _NETHUB_H_
Binary files uml_tools.jig2/uml_router/nethub.o and uml_tools.jig3/uml_router/nethub.o differ
uml_router/port.c +0 -190
199 lines not on this page · raw message
uml_router/port.h +0 -6
@@ -17,12 +17,6 @@extern void handle_tap_data (int fd,int hub);extern void handle_sock_data (int fd,int hub);extern void new_port (int fd,int data_fd); -extern void bind_sockets (int ctl_fd,const char *ctl_name,int data_fd); -void bind_sockets_v0 (int ctl_fd,const char *ctl_name, -int data_fd,const char *data_name); -void add_fd (int fd); -void accept_connection (int fd); -void close_descriptor (int fd);#endif
Binary files uml_tools.jig2/uml_router/port.o and uml_tools.jig3/uml_router/port.o differ Binary files uml_tools.jig2/uml_router/uml_switch and uml_tools.jig3/uml_router/uml_switch differ
uml_router/uml_switch.c +0 -12
@@ -35,18 +35,6 @@char *data_socket =NULL ;struct sockaddr_un data_sun; -void cleanup (void ) -{ -if (unlink (ctl_socket) <0 ){ -printf ("Couldn't remove control socket '%s' : " , ctl_socket); -perror ("" ); - } -if ((data_socket !=NULL ) && (unlink (data_socket) <0 )){ -printf ("Couldn't remove data socket '%s' : " , data_socket); -perror ("" ); - } -} -static void sig_handler (int sig) {printf ("Caught signal %d, cleaning up and exiting\n" , sig);
Binary files uml_tools.jig2/uml_router/uml_switch.o and uml_tools.jig3/uml_router/uml_switch.o differ
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel