1/*
2 * Copyright (c) 1997-1999 Kungliga Tekniska H�gskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
--- 19 unchanged lines hidden (view full) ---
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#include "krb5_locl.h"
35
36RCSID("$Id: addr_families.c,v 1.23 2000/02/16 02:09:00 assar Exp $");
37
38struct addr_operations {
39 int af;
40 krb5_address_type atype;
41 size_t max_sockaddr_size;
42 krb5_error_code (*sockaddr2addr)(const struct sockaddr *, krb5_address *);
43 krb5_error_code (*sockaddr2port)(const struct sockaddr *, int16_t *);
44 void (*addr2sockaddr)(const krb5_address *, struct sockaddr *,
--- 482 unchanged lines hidden (view full) ---
527
528 n = 0;
529 for (a = ai; a != NULL; a = a->ai_next)
530 ++n;
531
532 ALLOC_SEQ(addresses, n);
533
534 for (a = ai, i = 0; a != NULL; a = a->ai_next, ++i) {
535 krb5_sockaddr2address (ai->ai_addr, &addresses->val[i]);
536 }
537 freeaddrinfo (ai);
538 return 0;
539}
2 * Copyright (c) 1997-1999 Kungliga Tekniska H�gskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
--- 19 unchanged lines hidden (view full) ---
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#include "krb5_locl.h"
35
36RCSID("$Id: addr_families.c,v 1.23 2000/02/16 02:09:00 assar Exp $");
37
38struct addr_operations {
39 int af;
40 krb5_address_type atype;
41 size_t max_sockaddr_size;
42 krb5_error_code (*sockaddr2addr)(const struct sockaddr *, krb5_address *);
43 krb5_error_code (*sockaddr2port)(const struct sockaddr *, int16_t *);
44 void (*addr2sockaddr)(const krb5_address *, struct sockaddr *,
--- 482 unchanged lines hidden (view full) ---
527
528 n = 0;
529 for (a = ai; a != NULL; a = a->ai_next)
530 ++n;
531
532 ALLOC_SEQ(addresses, n);
533
534 for (a = ai, i = 0; a != NULL; a = a->ai_next, ++i) {
535 krb5_sockaddr2address (ai->ai_addr, &addresses->val[i]);
536 }
537 freeaddrinfo (ai);
538 return 0;
539}