Home
last modified time | relevance | path

Searched refs:iph1 (Results 1 – 24 of 24) sorted by relevance

/external/ipsec-tools/src/racoon/
Disakmp_ident.c107 ident_i1send(iph1, msg) in ident_i1send() argument
108 struct ph1handle *iph1; in ident_i1send()
133 if (iph1->status != PHASE1ST_START) {
135 "status mismatched %d.\n", iph1->status);
140 memset(&iph1->index, 0, sizeof(iph1->index));
141 isakmp_newcookie((caddr_t)&iph1->index, iph1->remote, iph1->local);
144 iph1->sa = ipsecdoi_setph1proposal(iph1->rmconf->proposal);
145 if (iph1->sa == NULL)
149 plist = isakmp_plist_append(plist, iph1->sa, ISAKMP_NPTYPE_SA);
153 if (iph1->rmconf->nat_traversal)
[all …]
Disakmp_base.c103 base_i1send(iph1, msg) in base_i1send() argument
104 struct ph1handle *iph1; in base_i1send()
131 if (iph1->status != PHASE1ST_START) {
133 "status mismatched %d.\n", iph1->status);
138 memset(&iph1->index, 0, sizeof(iph1->index));
139 isakmp_newcookie((caddr_t)&iph1->index, iph1->remote, iph1->local);
142 if (ipsecdoi_setid1(iph1) < 0)
146 iph1->sa = ipsecdoi_setph1proposal(iph1->rmconf->proposal);
147 if (iph1->sa == NULL)
151 iph1->nonce = eay_set_random(iph1->rmconf->nonce_size);
[all …]
Disakmp_agg.c111 agg_i1send(iph1, msg) in agg_i1send() argument
112 struct ph1handle *iph1; in agg_i1send()
145 if (iph1->status != PHASE1ST_START) {
147 "status mismatched %d.\n", iph1->status);
152 memset(&iph1->index, 0, sizeof(iph1->index));
153 isakmp_newcookie((caddr_t)&iph1->index, iph1->remote, iph1->local);
156 if (ipsecdoi_setid1(iph1) < 0)
160 iph1->sa = ipsecdoi_setph1proposal(iph1->rmconf->proposal);
161 if (iph1->sa == NULL)
165 if (iph1->rmconf->dhgrp == NULL) {
[all …]
Doakley.c135 static int oakley_check_certid __P((struct ph1handle *iph1));
379 oakley_prf(key, buf, iph1) in oakley_prf() argument
381 struct ph1handle *iph1;
386 if (iph1->approval == NULL) {
393 type = iph1->approval->hashtype;
409 oakley_hash(buf, iph1) in oakley_hash() argument
411 struct ph1handle *iph1;
416 if (iph1->approval == NULL) {
423 type = iph1->approval->hashtype;
687 oakley_compute_hashx(struct ph1handle *iph1, ...) in oakley_compute_hashx() argument
[all …]
Disakmp.c408 struct ph1handle *iph1; local
463 iph1 = getph1byindex(index);
464 if (iph1 != NULL) {
467 iph1->side == INITIATOR) {
476 if (NATT_AVAILABLE(iph1) &&
477 ! (iph1->natt_flags & NAT_PORTS_CHANGED) &&
478 ((cmpsaddrstrict(iph1->remote, remote) != 0) ||
479 (cmpsaddrstrict(iph1->local, local) != 0)))
482 racoon_free(iph1->remote);
483 racoon_free(iph1->local);
[all …]
Disakmp_inf.c123 isakmp_info_recv(iph1, msg0) in isakmp_info_recv() argument
124 struct ph1handle *iph1; in isakmp_info_recv()
149 if (iph1->ivm == NULL) {
155 ivm = oakley_newiv2(iph1, ((struct isakmp *)msg0->v)->msgid);
159 msg = oakley_do_decrypt(iph1, msg0, ivm->iv, ivm->ive);
187 if (iph1->status != PHASE1ST_ESTABLISHED) {
229 hash = oakley_compute_hash1(iph1, isakmp->msgid, payload);
262 switch (iph1->etype) {
266 if ((iph1->side == INITIATOR && iph1->status < PHASE1ST_MSG3SENT)
267 || (iph1->side == RESPONDER && iph1->status < PHASE1ST_MSG2SENT)) {
[all …]
Dhandler.c221 struct ph1handle *iph1; in dumpph1() local
227 LIST_FOREACH(iph1, &ph1tree, chain) in dumpph1()
238 LIST_FOREACH(iph1, &ph1tree, chain) { in dumpph1()
239 memcpy(&pd->index, &iph1->index, sizeof(iph1->index)); in dumpph1()
240 pd->status = iph1->status; in dumpph1()
241 pd->side = iph1->side; in dumpph1()
242 memcpy(&pd->remote, iph1->remote, sysdep_sa_len(iph1->remote)); in dumpph1()
243 memcpy(&pd->local, iph1->local, sysdep_sa_len(iph1->local)); in dumpph1()
244 pd->version = iph1->version; in dumpph1()
245 pd->etype = iph1->etype; in dumpph1()
[all …]
Disakmp_cfg.c139 isakmp_cfg_r(iph1, msg) in isakmp_cfg_r() argument
140 struct ph1handle *iph1; in isakmp_cfg_r()
170 if (iph1->mode_cfg->ivm == NULL ||
171 iph1->mode_cfg->last_msgid != packet->msgid )
172 iph1->mode_cfg->ivm =
173 isakmp_cfg_newiv(iph1, packet->msgid);
174 ivm = iph1->mode_cfg->ivm;
176 dmsg = oakley_do_decrypt(iph1, msg, ivm->iv, ivm->ive);
228 if ((check = oakley_compute_hash1(iph1,
251 isakmp_cfg_attr_r(iph1, packet->msgid, attrpl);
[all …]
Dgssapi.c154 gssapi_get_default_name(struct ph1handle *iph1, int remote, gss_name_t *service) in gssapi_get_default_name() argument
162 sa = remote ? iph1->remote : iph1->local; in gssapi_get_default_name()
187 gssapi_init(struct ph1handle *iph1) in gssapi_init() argument
203 gssapi_set_state(iph1, gps); in gssapi_init()
205 if (iph1->rmconf->proposal->gssid != NULL) { in gssapi_init()
206 id_token.length = iph1->rmconf->proposal->gssid->l; in gssapi_init()
207 id_token.value = iph1->rmconf->proposal->gssid->v; in gssapi_init()
212 gssapi_free_state(iph1); in gssapi_init()
216 gssapi_get_default_name(iph1, 0, &princ); in gssapi_init()
225 gssapi_free_state(iph1); in gssapi_init()
[all …]
Disakmp_newg.c69 isakmp_newgroup_r(iph1, msg) in isakmp_newgroup_r() argument
70 struct ph1handle *iph1; in isakmp_newgroup_r()
102 isakmp_info_send_n1(iph1, ISAKMP_NTYPE_INVALID_PAYLOAD_TYPE, NULL);
103 plog(LLV_ERROR, LOCATION, iph1->remote,
113 isakmp_info_send_n1(iph1, ISAKMP_NTYPE_INVALID_PAYLOAD_TYPE, NULL);
114 plog(LLV_ERROR, LOCATION, iph1->remote,
123 handle_vendorid(iph1, pa->ptr);
126 isakmp_info_send_n1(iph1, ISAKMP_NTYPE_INVALID_PAYLOAD_TYPE, NULL);
127 plog(LLV_ERROR, LOCATION, iph1->remote,
138 isakmp_info_send_n1(iph1, ISAKMP_NTYPE_INVALID_PAYLOAD_TYPE, NULL);
[all …]
Dnattraversal.c122 natt_hash_addr (struct ph1handle *iph1, struct sockaddr *addr) in natt_hash_addr() argument
131 saddr2str(addr), iph1->approval->hashtype, in natt_hash_addr()
132 (iph1->rmconf->nat_traversal == NATT_FORCE)?"(NAT-T forced)":""); in natt_hash_addr()
158 memcpy (ptr, iph1->index.i_ck, sizeof (cookie_t)); in natt_hash_addr()
162 memcpy (ptr, iph1->index.r_ck, sizeof (cookie_t)); in natt_hash_addr()
166 if (iph1->rmconf->nat_traversal == NATT_FORCE) in natt_hash_addr()
175 natd = oakley_hash (buf, iph1); in natt_hash_addr()
182 natt_compare_addr_hash (struct ph1handle *iph1, vchar_t *natd_received, in natt_compare_addr_hash() argument
189 if (iph1->rmconf->nat_traversal == NATT_FORCE) in natt_compare_addr_hash()
193 natd_computed = natt_hash_addr (iph1, iph1->local); in natt_compare_addr_hash()
[all …]
Disakmp_xauth.c120 xauth_sendreq(iph1) in xauth_sendreq() argument
121 struct ph1handle *iph1; in xauth_sendreq()
128 struct xauth_state *xst = &iph1->mode_cfg->xauth;
132 if (iph1->status != PHASE1ST_ESTABLISHED) {
175 isakmp_cfg_send(iph1, buffer,
186 xauth_attr_reply(iph1, attr, id) in xauth_attr_reply() argument
187 struct ph1handle *iph1; in xauth_attr_reply()
194 struct xauth_state *xst = &iph1->mode_cfg->xauth;
196 if ((iph1->mode_cfg->flags & ISAKMP_CFG_VENDORID_XAUTH) == 0) {
265 strncpy(iph1->mode_cfg->login, usr, LOGINLEN);
[all …]
Disakmp_unity.c86 isakmp_unity_req(iph1, attr) in isakmp_unity_req() argument
87 struct ph1handle *iph1; in isakmp_unity_req()
93 if ((iph1->mode_cfg->flags & ISAKMP_CFG_VENDORID_UNITY) == 0) {
144 reply_attr = isakmp_cfg_string(iph1, attr, buf);
150 reply_attr = isakmp_cfg_short(iph1, attr,
155 reply_attr = isakmp_cfg_short(iph1, attr,
160 reply_attr = isakmp_cfg_copy(iph1, attr);
164 reply_attr = isakmp_cfg_string(iph1,
170 reply_attr = isakmp_cfg_split(iph1, attr,
178 reply_attr = isakmp_cfg_split(iph1, attr,
[all …]
Disakmp_frag.c82 isakmp_sendfrags(iph1, buf) in isakmp_sendfrags() argument
83 struct ph1handle *iph1; in isakmp_sendfrags()
134 set_isakmp_header1(frag, iph1, ISAKMP_NPTYPE_FRAG);
151 if (isakmp_send(iph1, frag) < 0) {
177 isakmp_frag_extract(iph1, msg) in isakmp_frag_extract() argument
178 struct ph1handle *iph1; in isakmp_frag_extract()
231 if (iph1->frag_chain == NULL) {
232 iph1->frag_chain = item;
236 current = iph1->frag_chain;
248 item = iph1->frag_chain;
[all …]
Doakley.h228 #define AUTHMETHOD(iph1) \ argument
229 (((iph1)->rmconf->xauth && \
230 (iph1)->approval->authmethod == OAKLEY_ATTR_AUTH_METHOD_XAUTH_PSKEY_I) ? \
231 FICTIVE_AUTH_METHOD_XAUTH_PSKEY_I : (iph1)->approval->authmethod)
232 #define RMAUTHMETHOD(iph1) \ argument
233 (((iph1)->rmconf->xauth && \
234 (iph1)->rmconf->proposal->authmethod == \
237 (iph1)->rmconf->proposal->authmethod)
239 #define AUTHMETHOD(iph1) (iph1)->approval->authmethod argument
240 #define RMAUTHMETHOD(iph1) (iph1)->rmconf->proposal->authmethod argument
Dnattraversal.h45 #define NATT_AVAILABLE(ph1) ((iph1)->natt_flags & NAT_ANNOUNCED)
50 #define NON_ESP_MARKER_USE(iph1) ((iph1)->natt_flags & NAT_ADD_NON_ESP_MARKER) argument
78 vchar_t *natt_hash_addr (struct ph1handle *iph1, struct sockaddr *addr);
79 int natt_compare_addr_hash (struct ph1handle *iph1, vchar_t *natd_received, int natd_seq);
82 void natt_float_ports (struct ph1handle *iph1);
83 void natt_handle_vendorid (struct ph1handle *iph1, int vid_numeric);
93 int natt_keepalive_add_ph1 (struct ph1handle *iph1);
Drsalist.c128 struct ph1handle *iph1; member
140 local_score = naddr_score(key->src, req->iph1->local); in rsa_lookup_key_one()
141 remote_score = naddr_score(key->dst, req->iph1->remote); in rsa_lookup_key_one()
163 rsa_lookup_keys(struct ph1handle *iph1, int my) in rsa_lookup_keys() argument
169 saddr2str_fromto("%s <-> %s", iph1->local, iph1->remote)); in rsa_lookup_keys()
171 r.iph1 = iph1; in rsa_lookup_keys()
176 list = iph1->rmconf->rsa_private; in rsa_lookup_keys()
178 list = iph1->rmconf->rsa_public; in rsa_lookup_keys()
Dvendorid.c251 handle_vendorid(struct ph1handle *iph1, struct isakmp_gen *gen) in handle_vendorid() argument
261 natt_handle_vendorid(iph1, vid_numeric); in handle_vendorid()
266 iph1->mode_cfg->flags |= ISAKMP_CFG_VENDORID_XAUTH; in handle_vendorid()
269 iph1->mode_cfg->flags |= ISAKMP_CFG_VENDORID_UNITY; in handle_vendorid()
277 (iph1->rmconf == NULL || iph1->rmconf->dpd)) { in handle_vendorid()
278 iph1->dpd_support = 1; in handle_vendorid()
Dadmin.c275 struct ph1handle *iph1; local
292 if ((iph1 = getph1byaddrwop(src, dst)) == NULL) {
296 if (iph1->status == PHASE1ST_ESTABLISHED)
297 isakmp_info_send_d1(iph1);
298 purge_remote(iph1);
309 struct ph1handle *iph1; local
331 struct ph1handle *iph1; local
345 while ((iph1 = getph1bydstaddrwop(dst)) != NULL) {
346 loc = racoon_strdup(saddrwop2str(iph1->local));
349 if (iph1->status == PHASE1ST_ESTABLISHED)
[all …]
Dipsec_doi.c179 ipsecdoi_checkph1proposal(sa, iph1) in ipsecdoi_checkph1proposal() argument
181 struct ph1handle *iph1;
192 newsa = get_ph1approval(iph1, pair);
199 iph1->sa_ret = newsa;
209 get_ph1approval(iph1, pair) in get_ph1approval() argument
210 struct ph1handle *iph1; in get_ph1approval()
219 if (iph1->approval) {
220 delisakmpsa(iph1->approval);
221 iph1->approval = NULL;
234 iph1->rmconf->proposal, &tsa,
[all …]
Drsalist.h58 struct genlist *rsa_lookup_keys(struct ph1handle *iph1, int my);
Disakmp_var.h112 struct ph1handle *iph1));
/external/iputils/
Dping6.c1639 struct ip6_hdr *iph1 = (struct ip6_hdr*)(icmph+1); in parse_reply() local
1640 struct icmp6_hdr *icmph1 = (struct icmp6_hdr *)(iph1+1); in parse_reply()
1652 if (memcmp(&iph1->ip6_dst, &whereto.sin6_addr, 16)) in parse_reply()
1655 nexthdr = iph1->ip6_nxt; in parse_reply()
/external/ipsec-tools/
DChangeLog195 * src/racoon/isakmp_inf.c: From Timo Teras: reset iph1->dpd_r_u in
612 * src/racoon/isakmp.c: Check that iph1->remote is not NULL before