The Netsukuku Project  0.0.9
An Alternative routing method
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
inet.c File Reference
#include "includes.h"
#include "common.h"
#include "ipv6-gmp.h"
#include "libnetlink.h"
#include "ll_map.h"
#include "inet.h"
#include "endianness.h"
Include dependency graph for inet.c:

Functions

void inet_ntohl (u_int *data, int family)
 
void inet_htonl (u_int *data, int family)
 
int inet_setip_raw (inet_prefix *ip, u_int *data, int family)
 
int inet_setip (inet_prefix *ip, u_int *data, int family)
 
int inet_setip_bcast (inet_prefix *ip, int family)
 
int inet_setip_anyaddr (inet_prefix *ip, int family)
 
int inet_setip_loopback (inet_prefix *ip, int family)
 
int inet_setip_localaddr (inet_prefix *ip, int family, int class)
 
int inet_is_ip_local (inet_prefix *ip, int class)
 
void inet_copy (inet_prefix *dst, inet_prefix *src)
 
void inet_copy_ipdata_raw (u_int *dst_data, inet_prefix *ip)
 
void inet_copy_ipdata (u_int *dst_data, inet_prefix *ip)
 
void pack_inet_prefix (inet_prefix *ip, char *pack)
 
void unpack_inet_prefix (inet_prefix *ip, char *pack)
 
int inet_addr_match (const inet_prefix *a, const inet_prefix *b, int bits)
 
int ipv6_addr_type (inet_prefix addr)
 
int inet_validate_ip (inet_prefix ip)
 
const char * ipraw_to_str (u_int ip[4], int family)
 
const char * inet_to_str (inet_prefix ip)
 
int str_to_inet (const char *src, inet_prefix *ip)
 
int inet_to_sockaddr (inet_prefix *ip, u_short port, struct sockaddr *dst, socklen_t *dstlen)
 
int sockaddr_to_inet (struct sockaddr *ip, inet_prefix *dst, u_short *port)
 
int new_socket (int sock_type)
 
int new_dgram_socket (int sock_type)
 
int inet_close (int *sk)
 
int inet_getpeername (int sk, inet_prefix *ip, short *port)
 
int join_ipv6_multicast (int socket, int idx)
 
int set_multicast_if (int socket, int idx)
 
int set_nonblock_sk (int fd)
 
int unset_nonblock_sk (int fd)
 
int set_reuseaddr_sk (int socket)
 
int set_bindtodevice_sk (int socket, char *dev)
 
int set_multicast_loop_sk (int family, int socket, u_char loop)
 
int set_broadcast_sk (int socket, int family, inet_prefix *host, short port, int dev_idx)
 
int unset_broadcast_sk (int socket, int family)
 
int set_keepalive_sk (int socket)
 
int unset_keepalive_sk (int socket)
 
int set_tos_sk (int socket, int lowdelay)
 
int new_tcp_conn (inet_prefix *host, short port, char *dev)
 
int new_udp_conn (inet_prefix *host, short port, char *dev)
 
int new_bcast_conn (inet_prefix *host, short port, int dev_idx)
 
ssize_t inet_recv (int s, void *buf, size_t len, int flags)
 
ssize_t inet_recv_timeout (int s, void *buf, size_t len, int flags, u_int timeout)
 
ssize_t inet_recvfrom (int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen)
 
ssize_t inet_recvfrom_timeout (int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen, u_int timeout)
 
ssize_t inet_send (int s, const void *msg, size_t len, int flags)
 
ssize_t inet_send_timeout (int s, const void *msg, size_t len, int flags, u_int timeout)
 
ssize_t inet_sendto (int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen)
 
ssize_t inet_sendto_timeout (int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen, u_int timeout)
 
ssize_t inet_sendfile (int out_fd, int in_fd, off_t *offset, size_t count)
 

Function Documentation

int inet_addr_match ( const inet_prefix a,
const inet_prefix b,
int  bits 
)

Here is the caller graph for this function:

int inet_close ( int *  sk)

Here is the caller graph for this function:

void inet_copy ( inet_prefix dst,
inet_prefix src 
)

Here is the caller graph for this function:

void inet_copy_ipdata ( u_int *  dst_data,
inet_prefix ip 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void inet_copy_ipdata_raw ( u_int *  dst_data,
inet_prefix ip 
)

Here is the caller graph for this function:

int inet_getpeername ( int  sk,
inet_prefix ip,
short *  port 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void inet_htonl ( u_int *  data,
int  family 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int inet_is_ip_local ( inet_prefix ip,
int  class 
)

Here is the call graph for this function:

void inet_ntohl ( u_int *  data,
int  family 
)

Here is the call graph for this function:

Here is the caller graph for this function:

ssize_t inet_recv ( int  s,
void *  buf,
size_t  len,
int  flags 
)

Here is the call graph for this function:

Here is the caller graph for this function:

ssize_t inet_recv_timeout ( int  s,
void *  buf,
size_t  len,
int  flags,
u_int  timeout 
)

Here is the call graph for this function:

Here is the caller graph for this function:

ssize_t inet_recvfrom ( int  s,
void *  buf,
size_t  len,
int  flags,
struct sockaddr *  from,
socklen_t fromlen 
)

Here is the call graph for this function:

Here is the caller graph for this function:

ssize_t inet_recvfrom_timeout ( int  s,
void *  buf,
size_t  len,
int  flags,
struct sockaddr *  from,
socklen_t fromlen,
u_int  timeout 
)

Here is the call graph for this function:

Here is the caller graph for this function:

ssize_t inet_send ( int  s,
const void *  msg,
size_t  len,
int  flags 
)

Here is the call graph for this function:

Here is the caller graph for this function:

ssize_t inet_send_timeout ( int  s,
const void *  msg,
size_t  len,
int  flags,
u_int  timeout 
)

Here is the call graph for this function:

Here is the caller graph for this function:

ssize_t inet_sendfile ( int  out_fd,
int  in_fd,
off_t *  offset,
size_t  count 
)

Here is the call graph for this function:

ssize_t inet_sendto ( int  s,
const void *  msg,
size_t  len,
int  flags,
const struct sockaddr *  to,
socklen_t  tolen 
)

Here is the call graph for this function:

Here is the caller graph for this function:

ssize_t inet_sendto_timeout ( int  s,
const void *  msg,
size_t  len,
int  flags,
const struct sockaddr *  to,
socklen_t  tolen,
u_int  timeout 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int inet_setip ( inet_prefix ip,
u_int *  data,
int  family 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int inet_setip_anyaddr ( inet_prefix ip,
int  family 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int inet_setip_bcast ( inet_prefix ip,
int  family 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int inet_setip_localaddr ( inet_prefix ip,
int  family,
int  class 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int inet_setip_loopback ( inet_prefix ip,
int  family 
)

Here is the call graph for this function:

int inet_setip_raw ( inet_prefix ip,
u_int *  data,
int  family 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int inet_to_sockaddr ( inet_prefix ip,
u_short  port,
struct sockaddr *  dst,
socklen_t dstlen 
)

Here is the call graph for this function:

Here is the caller graph for this function:

const char* inet_to_str ( inet_prefix  ip)

Here is the call graph for this function:

int inet_validate_ip ( inet_prefix  ip)

Here is the call graph for this function:

Here is the caller graph for this function:

const char* ipraw_to_str ( u_int  ip[4],
int  family 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int ipv6_addr_type ( inet_prefix  addr)

Here is the caller graph for this function:

int join_ipv6_multicast ( int  socket,
int  idx 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int new_bcast_conn ( inet_prefix host,
short  port,
int  dev_idx 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int new_dgram_socket ( int  sock_type)

Here is the call graph for this function:

Here is the caller graph for this function:

int new_socket ( int  sock_type)

Here is the call graph for this function:

Here is the caller graph for this function:

int new_tcp_conn ( inet_prefix host,
short  port,
char *  dev 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int new_udp_conn ( inet_prefix host,
short  port,
char *  dev 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void pack_inet_prefix ( inet_prefix ip,
char *  pack 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int set_bindtodevice_sk ( int  socket,
char *  dev 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int set_broadcast_sk ( int  socket,
int  family,
inet_prefix host,
short  port,
int  dev_idx 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int set_keepalive_sk ( int  socket)

Here is the call graph for this function:

Here is the caller graph for this function:

int set_multicast_if ( int  socket,
int  idx 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int set_multicast_loop_sk ( int  family,
int  socket,
u_char  loop 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int set_nonblock_sk ( int  fd)

Here is the call graph for this function:

Here is the caller graph for this function:

int set_reuseaddr_sk ( int  socket)

Here is the call graph for this function:

Here is the caller graph for this function:

int set_tos_sk ( int  socket,
int  lowdelay 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int sockaddr_to_inet ( struct sockaddr *  ip,
inet_prefix dst,
u_short *  port 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int str_to_inet ( const char *  src,
inet_prefix ip 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void unpack_inet_prefix ( inet_prefix ip,
char *  pack 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int unset_broadcast_sk ( int  socket,
int  family 
)

Here is the call graph for this function:

int unset_keepalive_sk ( int  socket)

Here is the call graph for this function:

int unset_nonblock_sk ( int  fd)

Here is the call graph for this function:

Here is the caller graph for this function: