Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108643772
D41402.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D41402.diff
View Options
diff --git a/lib/libcasper/services/cap_net/cap_net.h b/lib/libcasper/services/cap_net/cap_net.h
--- a/lib/libcasper/services/cap_net/cap_net.h
+++ b/lib/libcasper/services/cap_net/cap_net.h
@@ -93,6 +93,12 @@
int af);
struct hostent *cap_gethostbyaddr(cap_channel_t *chan, const void *addr,
socklen_t len, int af);
+
+/* Structure packing functions. */
+nvlist_t *addrinfo_pack(const struct addrinfo *ai);
+struct addrinfo *addrinfo_unpack(const nvlist_t *nvl);
+void hostent_pack(const struct hostent *hp, nvlist_t *nvl, bool addtocache);
+struct hostent *hostent_unpack(const nvlist_t *nvl, struct hostent *hp);
#else
/* Capability functions. */
#define cap_bind(chan, s, addr, addrlen) \
diff --git a/lib/libcasper/services/cap_net/cap_net.c b/lib/libcasper/services/cap_net/cap_net.c
--- a/lib/libcasper/services/cap_net/cap_net.c
+++ b/lib/libcasper/services/cap_net/cap_net.c
@@ -91,7 +91,7 @@
}
}
-static struct hostent *
+struct hostent *
hostent_unpack(const nvlist_t *nvl, struct hostent *hp)
{
unsigned int ii, nitems;
@@ -247,7 +247,7 @@
return (hp);
}
-static struct addrinfo *
+struct addrinfo *
addrinfo_unpack(const nvlist_t *nvl)
{
struct addrinfo *ai;
@@ -744,7 +744,7 @@
return (false);
}
-static void
+void
hostent_pack(const struct hostent *hp, nvlist_t *nvl, bool addtocache)
{
unsigned int ii;
@@ -938,7 +938,7 @@
return (error);
}
-static nvlist_t *
+nvlist_t *
addrinfo_pack(const struct addrinfo *ai)
{
nvlist_t *nvl;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 28, 1:26 AM (10 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16233689
Default Alt Text
D41402.diff (1 KB)
Attached To
Mode
D41402: casper/cap_net: Expose pack/unpack functions
Attached
Detach File
Event Timeline
Log In to Comment