Lines Matching defs:sock
42 int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm);
47 static __inline__ void unix_get_peersec_dgram(struct socket *sock, struct scm_cookie *scm)
49 security_socket_getpeersec_dgram(sock, NULL, &scm->secid);
52 static __inline__ void unix_get_peersec_dgram(struct socket *sock, struct scm_cookie *scm)
78 static __inline__ int scm_send(struct socket *sock, struct msghdr *msg,
86 unix_get_peersec_dgram(sock, scm);
89 return __scm_send(sock, msg, scm);
93 static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm)
99 if (test_bit(SOCK_PASSSEC, &sock->flags)) {
109 static inline bool scm_has_secdata(struct socket *sock)
111 return test_bit(SOCK_PASSSEC, &sock->flags);
114 static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm)
117 static inline bool scm_has_secdata(struct socket *sock)
123 static __inline__ void scm_recv(struct socket *sock, struct msghdr *msg,
127 if (test_bit(SOCK_PASSCRED, &sock->flags) || scm->fp ||
128 scm_has_secdata(sock))
134 if (test_bit(SOCK_PASSCRED, &sock->flags)) {
146 scm_passec(sock, msg, scm);