Print this page
Current snapshot of OpenSolaris port.
Checkpoint
Checkpoint
Merge from parent.
Merge with WIDE update.
Pull from WIDE.
Pull from WIDE.
Checkpoint
Re-update.
blah
WIDE update
Update from WIDE.


  65  *    | ^                                         sadb_getspi_callback
  66  *    | |                                           ^
  67  *    | |                         |                 |
  68  *    v |                         |                 |
  69  *  rcpfk_send_getspi             v                 |
  70  *    | ^                       rcpfk_handler---->rcpfk_recv_getspi
  71  *    | |                         ^
  72  *    | |                         :
  73  *    v |                         :
  74  *  SADB_GETSPI --------------[response]
  75  *
  76  */
  77 
  78 struct sadb_request_method {
  79         int (*getspi) ();
  80         int (*acquire_error) ();
  81         int (*update_inbound) ();
  82         int (*add_outbound) ();
  83         int (*delete_sa) ();
  84         int (*get) ();



  85 };
  86 
  87 struct sadb_response_method {
  88         int (*getspi_response)();
  89         int (*update_response)();
  90         int (*expired)();
  91         int (*get_response)();
  92 };
  93 
  94 #define SADB_LIST_HEAD(nam_, typ_)      TAILQ_HEAD(nam_, typ_)
  95 #define SADB_LIST_INIT(head_)           TAILQ_INIT(head_)
  96 #define SADB_LIST_ENTRY(typ_)           TAILQ_ENTRY(typ_)
  97 #define SADB_LIST_FIRST(head_)          ((head_)->tqh_first)
  98 #define SADB_LIST_NEXT(p_)              TAILQ_NEXT((p_), link)
  99 #define SADB_LIST_END(p_)               (! (p_))
 100 #define SADB_LIST_LINK(head_, p_)       TAILQ_INSERT_TAIL((head_), (p_), link)
 101 #define SADB_LIST_REMOVE(head_, p_)     TAILQ_REMOVE((head_), (p_), link)
 102 
 103 struct sadb_request {
 104         struct sadb_request_method *method;


 117 extern struct sadb_request_method sadb_force_initiate_method;
 118 
 119 /* #ifdef DEBUG */
 120 extern struct sadb_request_method sadb_debug_method;
 121 /* #endif */
 122 #endif
 123 
 124 extern int sadb_init(void);
 125 #ifdef DEBUG
 126 void sadb_list_dump(void);
 127 #endif
 128 extern int sadb_socket(void);
 129 extern uint32_t sadb_new_seq(void);
 130 extern void sadb_poll(void);
 131 extern void sadb_request_initialize(struct sadb_request *,
 132                                     struct sadb_request_method *,
 133                                     struct sadb_response_method *,
 134                                     uint32_t,
 135                                     void *);
 136 extern void sadb_request_finish(struct sadb_request *);


































  65  *    | ^                                         sadb_getspi_callback
  66  *    | |                                           ^
  67  *    | |                         |                 |
  68  *    v |                         |                 |
  69  *  rcpfk_send_getspi             v                 |
  70  *    | ^                       rcpfk_handler---->rcpfk_recv_getspi
  71  *    | |                         ^
  72  *    | |                         :
  73  *    v |                         :
  74  *  SADB_GETSPI --------------[response]
  75  *
  76  */
  77 
  78 struct sadb_request_method {
  79         int (*getspi) ();
  80         int (*acquire_error) ();
  81         int (*update_inbound) ();
  82         int (*add_outbound) ();
  83         int (*delete_sa) ();
  84         int (*get) ();
  85 #ifdef sun
  86         int (*inverse_acquire)();
  87 #endif /* sun/OpenSolaris */
  88 };
  89 
  90 struct sadb_response_method {
  91         int (*getspi_response)();
  92         int (*update_response)();
  93         int (*expired)();
  94         int (*get_response)();
  95 };
  96 
  97 #define SADB_LIST_HEAD(nam_, typ_)      TAILQ_HEAD(nam_, typ_)
  98 #define SADB_LIST_INIT(head_)           TAILQ_INIT(head_)
  99 #define SADB_LIST_ENTRY(typ_)           TAILQ_ENTRY(typ_)
 100 #define SADB_LIST_FIRST(head_)          ((head_)->tqh_first)
 101 #define SADB_LIST_NEXT(p_)              TAILQ_NEXT((p_), link)
 102 #define SADB_LIST_END(p_)               (! (p_))
 103 #define SADB_LIST_LINK(head_, p_)       TAILQ_INSERT_TAIL((head_), (p_), link)
 104 #define SADB_LIST_REMOVE(head_, p_)     TAILQ_REMOVE((head_), (p_), link)
 105 
 106 struct sadb_request {
 107         struct sadb_request_method *method;


 120 extern struct sadb_request_method sadb_force_initiate_method;
 121 
 122 /* #ifdef DEBUG */
 123 extern struct sadb_request_method sadb_debug_method;
 124 /* #endif */
 125 #endif
 126 
 127 extern int sadb_init(void);
 128 #ifdef DEBUG
 129 void sadb_list_dump(void);
 130 #endif
 131 extern int sadb_socket(void);
 132 extern uint32_t sadb_new_seq(void);
 133 extern void sadb_poll(void);
 134 extern void sadb_request_initialize(struct sadb_request *,
 135                                     struct sadb_request_method *,
 136                                     struct sadb_response_method *,
 137                                     uint32_t,
 138                                     void *);
 139 extern void sadb_request_finish(struct sadb_request *);
 140 #ifdef sun
 141 #ifndef _INVACQ_T
 142 #define _INVACQ_T /* Guard against double-include. */
 143 typedef struct invacq_s {
 144         /* IKEv1 data */
 145         struct ph2handle *iph2;                 /* Referenced */
 146 
 147         /* IKEv2 data */
 148         struct ikev2_sa *ikev2_sa;              /* Referenced */
 149         struct sockaddr *local;                 /* Alloced/copied */
 150         struct sockaddr *remote;                /* Alloced/copied */
 151         struct ikev2_payload_header *sa_payload;/* Alloced/copied */
 152         struct ikev2_payload_header *ts_i;      /* Alloced/copied */
 153         struct ikev2_payload_header *ts_r;      /* Alloced/copied */
 154         struct ikev2_payload_header *cfg;       /* Alloced/copied */
 155         rc_vchar_t *g_i;                        /* Alloced/copied */
 156         rc_vchar_t *n_i;                        /* Alloced/copied */
 157         struct ikev2_child_param *child_param;  /* Alloced/copied */
 158         struct ikev2_child_sa *old_child_sa;    /* Referenced. */
 159         uint32_t message_id;                    /* Copied */
 160         boolean_t is_createchild;               /* Copied */
 161         rc_vchar_t *packet;
 162 
 163         /* inverse-ACQUIRE data. */
 164         struct rcpfk_msg *answer;
 165         int (*receiver)(struct invacq_s *);
 166         struct sadb_request request;
 167 } invacq_t;
 168 #endif
 169 extern int extract_extended_acquire(struct rcpfk_msg *, struct rcf_selector **,
 170     struct rcf_remote **);
 171 #endif