keysock.c (139823) | keysock.c (152242) |
---|---|
1/* $FreeBSD: head/sys/netipsec/keysock.c 139823 2005-01-07 01:45:51Z imp $ */ | 1/* $FreeBSD: head/sys/netipsec/keysock.c 152242 2005-11-09 13:29:16Z ru $ */ |
2/* $KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $ */ 3 4/*- 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 570 unchanged lines hidden (view full) --- 580 581/* 582 * Definitions of protocols supported in the KEY domain. 583 */ 584 585extern struct domain keydomain; 586 587struct protosw keysw[] = { | 2/* $KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $ */ 3 4/*- 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 570 unchanged lines hidden (view full) --- 580 581/* 582 * Definitions of protocols supported in the KEY domain. 583 */ 584 585extern struct domain keydomain; 586 587struct protosw keysw[] = { |
588{ SOCK_RAW, &keydomain, PF_KEY_V2, PR_ATOMIC|PR_ADDR, 589 0, (pr_output_t *)key_output, raw_ctlinput, 0, 590 0, 591 raw_init, 0, 0, 0, 592 &key_usrreqs | 588{ 589 .pr_type = SOCK_RAW, 590 .pr_domain = &keydomain, 591 .pr_protocol = PF_KEY_V2, 592 .pr_flags = PR_ATOMIC|PR_ADDR, 593 .pr_output = (pr_output_t *)key_output, 594 .pr_ctlinput = raw_ctlinput, 595 .pr_init = raw_init, 596 .pr_usrreqs = &key_usrreqs |
593} 594}; 595 596static void 597key_init0(void) 598{ 599 bzero((caddr_t)&key_cb, sizeof(key_cb)); 600 key_init(); 601} 602 | 597} 598}; 599 600static void 601key_init0(void) 602{ 603 bzero((caddr_t)&key_cb, sizeof(key_cb)); 604 key_init(); 605} 606 |
603struct domain keydomain = 604 { PF_KEY, "key", key_init0, 0, 0, 605 keysw, &keysw[sizeof(keysw)/sizeof(keysw[0])] }; | 607struct domain keydomain = { 608 .dom_family = PF_KEY, 609 .dom_name = "key", 610 .dom_init = key_init0, 611 .dom_protosw = keysw, 612 .dom_protoswNPROTOSW = &keysw[sizeof(keysw)/sizeof(keysw[0])] 613}; |
606 607DOMAIN_SET(key); | 614 615DOMAIN_SET(key); |