Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/sockopt.h
| Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | struct sockopt { | ||||
| const struct cap_rights *sopt_rights; /* Capsicum rights for the fd */ | const struct cap_rights *sopt_rights; /* Capsicum rights for the fd */ | ||||
| struct thread *sopt_td; /* calling thread or null if kernel */ | struct thread *sopt_td; /* calling thread or null if kernel */ | ||||
| }; | }; | ||||
| int sosetopt(struct socket *so, struct sockopt *sopt); | int sosetopt(struct socket *so, struct sockopt *sopt); | ||||
| int sogetopt(struct socket *so, struct sockopt *sopt); | int sogetopt(struct socket *so, struct sockopt *sopt); | ||||
| int __result_use_check sooptcopyin(struct sockopt *sopt, void *buf, size_t len, | int __result_use_check sooptcopyin(struct sockopt *sopt, void *buf, size_t len, | ||||
| size_t minlen); | size_t minlen); | ||||
| #ifdef __CHERI__ | |||||
| int __result_use_check sooptcopyinptr(struct sockopt *sopt, void *buf, | |||||
| size_t len, size_t minlen); | |||||
| #else | |||||
| #define sooptcopyinptr sooptcopyin | |||||
| #endif | |||||
| int __result_use_check sooptcopyout(struct sockopt *sopt, const void *buf, | int __result_use_check sooptcopyout(struct sockopt *sopt, const void *buf, | ||||
| size_t len); | size_t len); | ||||
| int soopt_getm(struct sockopt *sopt, struct mbuf **mp); | int soopt_getm(struct sockopt *sopt, struct mbuf **mp); | ||||
| int soopt_mcopyin(struct sockopt *sopt, struct mbuf *m); | int soopt_mcopyin(struct sockopt *sopt, struct mbuf *m); | ||||
| int soopt_mcopyout(struct sockopt *sopt, struct mbuf *m); | int soopt_mcopyout(struct sockopt *sopt, struct mbuf *m); | ||||
| int accept_filt_getopt(struct socket *, struct sockopt *); | int accept_filt_getopt(struct socket *, struct sockopt *); | ||||
| int accept_filt_setopt(struct socket *, struct sockopt *); | int accept_filt_setopt(struct socket *, struct sockopt *); | ||||
| int so_setsockopt(struct socket *so, int level, int optname, | int so_setsockopt(struct socket *so, int level, int optname, | ||||
| void *optval, size_t optlen); | void *optval, size_t optlen); | ||||
| #endif /* _SYS_SOCKOPT_H_ */ | #endif /* _SYS_SOCKOPT_H_ */ | ||||