Skip to contentSkip to conversation

switch->netjig patch 2

uml-devel Michael Richardson 1 participant 1 message Jun 3, 2004 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

Jeff, this patch (also http://www.sandelman.ca/tmp/jig2.patch ) moves globals and helper functions from uml_switch.c to port.c.

uml_router/nethub.h +11 -0
diff -x CVS -x '*~' -u -N -r uml_tools.jig1/uml_router/nethub.h uml_tools.jig2/uml_router/nethub.h
@@ -94,6 +94,17 @@
 
 #define xmalloc(X) xmalloc1((X), __FILE__, __LINE__)
 
+extern char *ctl_socket;
+extern char *data_socket;
+extern char *prog;
+extern struct pollfd *fds;
+extern int maxfds;
+extern int nfds;
+
+extern struct sockaddr_un data_sun;
+extern void cleanup(void);
+
+
 #define _NETHUB_H_
 
 #endif /* _NETHUB_H_ */
uml_router/port.c +286 -9

311 lines not on this page · raw message

uml_router/port.h +8 -0
diff -x CVS -x '*~' -u -N -r uml_tools.jig1/uml_router/port.h uml_tools.jig2/uml_router/port.h
@@ -16,5 +16,13 @@
 		      int data_len);
 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.jig1/uml_router/port.o and uml_tools.jig2/uml_router/port.o differ Binary files uml_tools.jig1/uml_router/uml_switch and uml_tools.jig2/uml_router/uml_switch differ

uml_router/uml_switch.c +5 -284

310 lines not on this page · raw message

Binary files uml_tools.jig1/uml_router/uml_switch.o and uml_tools.jig2/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