git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
No longer necessary to obtain Ethernet header in netdev_send().
[sliver-openvswitch.git]
/
lib
/
socket-util.c
diff --git
a/lib/socket-util.c
b/lib/socket-util.c
index
8fa663a
..
ca08de5
100644
(file)
--- a/
lib/socket-util.c
+++ b/
lib/socket-util.c
@@
-254,3
+254,11
@@
error:
close(fd);
return -error;
}
+
+int
+get_unix_name_len(socklen_t sun_len)
+{
+ return (sun_len >= offsetof(struct sockaddr_un, sun_path)
+ ? sun_len - offsetof(struct sockaddr_un, sun_path)
+ : 0);
+}