summaryrefslogtreecommitdiff
path: root/pfinet/main.c
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-13 14:03:48 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-12-07 15:38:18 +0100
commit2514b693920124eb47eb48f50f07b179bc5090e9 (patch)
tree259c65747e4531290f6fa1b126de030c566382d3 /pfinet/main.c
parentdf8605b39f109362e86b0ebf6b8cf79fd1b2f3fd (diff)
pfinet: make the demuxers payload-aware
* pfinet/ethernet.c (ethernet_demuxer): Make the demuxer payload-aware. * pfinet/main.c (pfinet_demuxer): Likewise.
Diffstat (limited to 'pfinet/main.c')
-rw-r--r--pfinet/main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/pfinet/main.c b/pfinet/main.c
index 0f1fbfc7..8716fdbb 100644
--- a/pfinet/main.c
+++ b/pfinet/main.c
@@ -86,8 +86,16 @@ pfinet_demuxer (mach_msg_header_t *inp,
/* We have several classes in one bucket, which need to be demuxed
differently. */
- pi = ports_lookup_port(pfinet_bucket, inp->msgh_local_port, socketport_class);
-
+ if (MACH_MSGH_BITS_LOCAL (inp->msgh_bits) ==
+ MACH_MSG_TYPE_PROTECTED_PAYLOAD)
+ pi = ports_lookup_payload (pfinet_bucket,
+ inp->msgh_protected_payload,
+ socketport_class);
+ else
+ pi = ports_lookup_port (pfinet_bucket,
+ inp->msgh_local_port,
+ socketport_class);
+
if (pi)
{
ports_port_deref (pi);