Added the Linuxish SO_PEERCRED.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25303 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-05-04 00:28:27 +00:00
parent 88be2c9f5d
commit d29deffa2c

View File

@ -67,6 +67,7 @@ typedef uint32_t socklen_t;
#define SO_TYPE 0x40000008 /* get socket type */ #define SO_TYPE 0x40000008 /* get socket type */
#define SO_NONBLOCK 0x40000009 #define SO_NONBLOCK 0x40000009
#define SO_BINDTODEVICE 0x4000000a #define SO_BINDTODEVICE 0x4000000a
#define SO_PEERCRED 0x4000000b /* get peer credentials, param: ucred */
/* Shutdown options */ /* Shutdown options */
#define SHUT_RD 0 #define SHUT_RD 0
@ -144,6 +145,13 @@ struct cmsghdr {
/* SOL_SOCKET control message types */ /* SOL_SOCKET control message types */
#define SCM_RIGHTS 0x01 #define SCM_RIGHTS 0x01
/* parameter to SO_PEERCRED */
struct ucred {
pid_t pid; /* PID of sender */
uid_t uid; /* UID of sender */
gid_t gid; /* GID of sender */
};
#if __cplusplus #if __cplusplus
extern "C" { extern "C" {