summaryrefslogtreecommitdiff
path: root/pflocal/mig-decls.h
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2013-11-28 11:13:29 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-12-07 15:38:18 +0100
commitab741d845af6fac6313ed40b8f2ae148d96aa716 (patch)
tree69cdbeeed99b445a6b6209fdd72cddd2b2120799 /pflocal/mig-decls.h
parent2514b693920124eb47eb48f50f07b179bc5090e9 (diff)
pflocal: add payload-aware intrans functions
* pflocal/mig-mutate.h: Add mutators. * pflocal/mig-decls.c (begin_using_sock_user_payload): New function. (begin_using_addr_payload): Likewise.
Diffstat (limited to 'pflocal/mig-decls.h')
-rw-r--r--pflocal/mig-decls.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/pflocal/mig-decls.h b/pflocal/mig-decls.h
index 983de9d1..b1da797d 100644
--- a/pflocal/mig-decls.h
+++ b/pflocal/mig-decls.h
@@ -36,6 +36,12 @@ begin_using_sock_user_port(mach_port_t port)
return (sock_user_t)ports_lookup_port (0, port, sock_user_port_class);
}
+static inline sock_user_t __attribute__ ((unused))
+begin_using_sock_user_payload (unsigned long payload)
+{
+ return ports_lookup_payload (NULL, payload, sock_user_port_class);
+}
+
static inline void __attribute__ ((unused))
end_using_sock_user_port (sock_user_t sock_user)
{
@@ -49,6 +55,12 @@ begin_using_addr_port(mach_port_t port)
return (addr_t)ports_lookup_port (0, port, addr_port_class);
}
+static inline addr_t __attribute__ ((unused))
+begin_using_addr_payload (unsigned long payload)
+{
+ return ports_lookup_port (NULL, payload, addr_port_class);
+}
+
static inline void __attribute__ ((unused))
end_using_addr_port (addr_t addr)
{