git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge to Fedora kernel-2.6.18-1.2255_FC5-vs2.0.2.2-rc9 patched with stable patch...
[linux-2.6.git]
/
include
/
linux
/
vs_socket.h
diff --git
a/include/linux/vs_socket.h
b/include/linux/vs_socket.h
index
9173bfe
..
c9c6244
100644
(file)
--- a/
include/linux/vs_socket.h
+++ b/
include/linux/vs_socket.h
@@
-7,16
+7,24
@@
/* socket accounting */
#include <linux/socket.h>
/* socket accounting */
#include <linux/socket.h>
+#include <linux/vserver/cacct.h>
static inline int vx_sock_type(int family)
{
static inline int vx_sock_type(int family)
{
- int type = 4;
-
- if (family > 0 && family < 3)
- type = family;
- else if (family == PF_INET6)
- type = 3;
- return type;
+ switch (family) {
+ case PF_UNSPEC:
+ return VXA_SOCK_UNSPEC;
+ case PF_UNIX:
+ return VXA_SOCK_UNIX;
+ case PF_INET:
+ return VXA_SOCK_INET;
+ case PF_INET6:
+ return VXA_SOCK_INET6;
+ case PF_PACKET:
+ return VXA_SOCK_PACKET;
+ default:
+ return VXA_SOCK_OTHER;
+ }
}
#define vx_acc_sock(v,f,p,s) \
}
#define vx_acc_sock(v,f,p,s) \