Lines Matching refs:sa_args
93 backupsa_to_file(sa_args) in backupsa_to_file() argument
94 struct pfkey_send_sa_args *sa_args; in backupsa_to_file()
122 i = getnameinfo(sa_args->src, sysdep_sa_len(sa_args->src), p, len, NULL, 0, NIFLAGS);
139 i = getnameinfo(sa_args->dst, sysdep_sa_len(sa_args->dst), p, len, NULL, 0, NIFLAGS);
152 sa_args->satype, (unsigned long)ntohl(sa_args->spi),
153 sa_args->mode, sa_args->reqid, sa_args->wsize, sa_args->e_type,
154 sa_args->e_keylen, sa_args->a_type, sa_args->a_keylen,
155 sa_args->flags, sa_args->l_alloc,
156 (unsigned long long)sa_args->l_bytes,
157 (unsigned long long)sa_args->l_addtime,
158 (unsigned long long)sa_args->l_usetime, sa_args->seq);
167 k = val2str(sa_args->keymat, sa_args->e_keylen + sa_args->a_keylen);
206 struct pfkey_send_sa_args sa_args; in backupsa_from_file() local
208 memset(&sa_args, 0, sizeof(sa_args)); in backupsa_from_file()
244 if ((sa_args.src = str2saddr(p, NULL)) == NULL) in backupsa_from_file()
251 if ((sa_args.dst = str2saddr(p, NULL)) == NULL) in backupsa_from_file()
267 GETNEXTNUM(sa_args.satype, strtoul); in backupsa_from_file()
268 GETNEXTNUM(sa_args.spi, strtoul); in backupsa_from_file()
269 sa_args.spi = ntohl(sa_args.spi); in backupsa_from_file()
270 GETNEXTNUM(sa_args.mode, strtoul); in backupsa_from_file()
271 GETNEXTNUM(sa_args.reqid, strtoul); in backupsa_from_file()
272 GETNEXTNUM(sa_args.wsize, strtoul); in backupsa_from_file()
273 GETNEXTNUM(sa_args.e_type, strtoul); in backupsa_from_file()
274 GETNEXTNUM(sa_args.e_keylen, strtoul); in backupsa_from_file()
275 GETNEXTNUM(sa_args.a_type, strtoul); in backupsa_from_file()
276 GETNEXTNUM(sa_args.a_keylen, strtoul); in backupsa_from_file()
277 GETNEXTNUM(sa_args.flags, strtoul); in backupsa_from_file()
278 GETNEXTNUM(sa_args.l_alloc, strtoul); in backupsa_from_file()
279 GETNEXTNUM(sa_args.l_bytes, strtouq); in backupsa_from_file()
280 GETNEXTNUM(sa_args.l_addtime, strtouq); in backupsa_from_file()
281 GETNEXTNUM(sa_args.l_usetime, strtouq); in backupsa_from_file()
282 GETNEXTNUM(sa_args.seq, strtoul); in backupsa_from_file()
286 sa_args.keymat = str2val(p, 16, &keymatlen); in backupsa_from_file()
287 if (sa_args.keymat == NULL) { in backupsa_from_file()
295 if (created + sa_args.l_addtime < current) { in backupsa_from_file()
301 sa_args.l_addtime -= current - created; in backupsa_from_file()
303 if (pfkey_send_add2(&sa_args) < 0) { in backupsa_from_file()
311 if (sa_args.src != NULL) { in backupsa_from_file()
312 racoon_free(sa_args.src); in backupsa_from_file()
313 sa_args.src = NULL; in backupsa_from_file()
315 if (sa_args.dst != NULL) { in backupsa_from_file()
316 racoon_free(sa_args.dst); in backupsa_from_file()
317 sa_args.dst = NULL; in backupsa_from_file()
319 if (sa_args.keymat != NULL) { in backupsa_from_file()
320 racoon_free(sa_args.keymat); in backupsa_from_file()
321 sa_args.keymat = NULL; in backupsa_from_file()