PF_KEY
if ((so = socket(PF_KEY, SOCK_RAW, PF_KEY_V2)) < 0) {
if ((s = privsep_socket(PF_KEY, SOCK_RAW, PF_KEY_V2)) < 0) {
if (paf != 0 && paf != PF_KEY)
mib[1] = PF_KEY;
if (paf == PF_KEY) {
case PF_KEY:
.sa_family = PF_KEY,
# define IPSEC_PFKEY PF_KEY
CTL_NET, PF_KEY, KEYCTL_PREFERED_OLDSA, CTL_EOL);
CTL_NET, PF_KEY, CTL_EOL);
CTL_NET, PF_KEY, KEYCTL_DUMPSA, CTL_EOL);
CTL_NET, PF_KEY, KEYCTL_DUMPSP, CTL_EOL);
if (rp->rcb_proto.sp_family != PF_KEY)
if (kp->kp_raw.rcb_proto.sp_protocol == PF_KEY) /* XXX: AF_KEY */
if (kp->kp_raw.rcb_proto.sp_protocol == PF_KEY) /* XXX: AF_KEY */
.dom_family = PF_KEY,
.sa_family = PF_KEY,
.sa_family = PF_KEY,
af = PF_KEY;
if (af == PF_KEY || af == AF_UNSPEC)