~donmcc/ood

ref: 1182412fd4ece0cb55c4b3ebefee78b22c8c15bd ood/src/libood/ood/sockaddr.c -rw-r--r-- 368 bytes
1182412fDon McCaughey Add `ood_halt()` function. 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "sockaddr.h"

#include <string.h>
#include <sys/socket.h>
#include "sockaddr_in.h"


char *
ood_sockaddr_alloc_formatted(struct sockaddr const *address)
{
    switch (address->sa_family) {
        case AF_INET:
            return ood_sockaddr_in_alloc_formatted((struct sockaddr_in *)address);
        default:
            return strdup("(unknown)");
    }
}