diff options
| author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-04-12 12:22:11 +0200 |
|---|---|---|
| committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-04-12 12:22:11 +0200 |
| commit | 5b5839ab88fd7b621f2fe64f838666d428b20538 (patch) | |
| tree | a60890fcca5d4fb3930f8b61eb42f7989273d36c /eth-filter | |
| parent | 842c229601af0d0a5cfbe11f1155d332094b580f (diff) | |
sync dde stuff
Diffstat (limited to 'eth-filter')
| -rw-r--r-- | eth-filter/Makefile | 1 | ||||
| -rw-r--r-- | eth-filter/filter.c | 34 |
2 files changed, 21 insertions, 14 deletions
diff --git a/eth-filter/Makefile b/eth-filter/Makefile index deee1e57..ed3286ce 100644 --- a/eth-filter/Makefile +++ b/eth-filter/Makefile @@ -20,7 +20,6 @@ makemode := server SRCS = bpf_impl.c filter.c queue.c pcap_filter.c LCLHDRS = bpf_impl.h queue.h util.h -DIST_FILES = device.defs notify.defs HURDLIBS = ports trivfs fshelp ihash shouldbeinlibc target = eth-filter MIGSTUBS = deviceServer.o notifyServer.o diff --git a/eth-filter/filter.c b/eth-filter/filter.c index 8c76c7b1..482b0800 100644 --- a/eth-filter/filter.c +++ b/eth-filter/filter.c @@ -39,6 +39,7 @@ #include <hurd/ports.h> #include <hurd/ihash.h> #include <hurd/fshelp.h> +#include <version.h> #include "device_S.h" #include "notify_S.h" @@ -73,8 +74,8 @@ static struct hurd_ihash proxy_deliverport_ht /* The name of the network interface that the filter translator sits on. */ static char *device_file; -const char *argp_program_version = "eth-filter 0.1"; -const char *argp_program_bug_address = "<bug-hurd@gnu.org>"; +const char *argp_program_version = STANDARD_HURD_VERSION (eth-filter); + static const char doc[] = "Hurd filter translator."; static const struct argp_option options[] = { @@ -193,17 +194,6 @@ clean_proxy_device (void *p) device->proxy->device = NULL; } -static int -filter_demuxer (mach_msg_header_t *inp, - mach_msg_header_t *outp) -{ - extern int device_server (mach_msg_header_t *, mach_msg_header_t *); - extern int notify_server (mach_msg_header_t *, mach_msg_header_t *); - extern int ethernet_demuxer (mach_msg_header_t *, mach_msg_header_t *); - return device_server (inp, outp) || notify_server (inp, outp) - || ethernet_demuxer (inp, outp) || trivfs_demuxer (inp, outp); -} - int ethernet_demuxer (mach_msg_header_t *inp, mach_msg_header_t *outp) @@ -232,6 +222,24 @@ ethernet_demuxer (mach_msg_header_t *inp, return 1; } +static int +filter_demuxer (mach_msg_header_t *inp, + mach_msg_header_t *outp) +{ + mig_routine_t routine; + if ((routine = NULL, ethernet_demuxer (inp, outp)) || + (routine = device_server_routine (inp)) || + (routine = notify_server_routine (inp)) || + (routine = NULL, trivfs_demuxer (inp, outp))) + { + if (routine) + (*routine) (inp, outp); + return TRUE; + } + else + return FALSE; +} + /* Implementation of notify interface */ kern_return_t do_mach_notify_port_deleted (struct port_info *pi, |
