Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
radsecproxy/util.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
32 lines (25 sloc)
1.15 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright (c) 2007-2009, UNINETT AS | |
* Copyright (c) 2016-2017, NORDUnet A/S */ | |
/* See LICENSE for licensing information. */ | |
#include <sys/socket.h> | |
#include <sys/time.h> | |
#include <netdb.h> | |
#define SOCKADDR_SIZE(addr) ((addr).ss_family == AF_INET ? \ | |
sizeof(struct sockaddr_in) : \ | |
sizeof(struct sockaddr_in6)) | |
#define SOCKADDRP_SIZE(addr) ((addr)->sa_family == AF_INET ? \ | |
sizeof(struct sockaddr_in) : \ | |
sizeof(struct sockaddr_in6)) | |
char *stringcopy(const char *s, int len); | |
const char *addr2string(struct sockaddr *addr, char *buf, size_t len); | |
struct sockaddr *addr_copy(struct sockaddr *in); | |
void port_set(struct sockaddr *sa, uint16_t port); | |
void printfchars(char *prefixfmt, char *prefix, char *charfmt, uint8_t *chars, int len); | |
void disable_DF_bit(int socket, struct addrinfo *res); | |
void enable_keepalive(int socket); | |
int bindtoaddr(struct addrinfo *addrinfo, int family, int reuse); | |
int connecttcp(struct addrinfo *addrinfo, struct addrinfo *src, uint16_t timeout); | |
time_t connect_wait(struct timeval attempt_start, struct timeval last_success, int firsttry); | |
/* Local Variables: */ | |
/* c-file-style: "stroustrup" */ | |
/* End: */ |