Teonet library
0.4.7
|
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/sockio.h>
#include <sys/socket.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <net/if_types.h>
#include <net/if_tun.h>
#include <net/if_tap.h>
#include <netinet/if_ether.h>
#include <fcntl.h>
#include <ifaddrs.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "tuntap.h"
Functions | |
int | tuntap_sys_start (struct device *dev, int mode, int tun) |
void | tuntap_sys_destroy (struct device *dev) |
int | tuntap_sys_set_hwaddr (struct device *dev, struct ether_addr *eth_addr) |
int | tuntap_sys_set_ipv4 (struct device *dev, t_tun_in_addr *s, uint32_t bits) |
int | tuntap_sys_set_descr (struct device *dev, const char *descr, size_t len) |
void tuntap_sys_destroy | ( | struct device * | dev | ) |
References device::ctrl_sock, device::if_name, tuntap_log, and TUNTAP_LOG_WARN.
int tuntap_sys_set_descr | ( | struct device * | dev, |
const char * | descr, | ||
size_t | len | ||
) |
References tuntap_log, and TUNTAP_LOG_NOTICE.
int tuntap_sys_set_hwaddr | ( | struct device * | dev, |
struct ether_addr * | eth_addr | ||
) |
References device::ctrl_sock, device::if_name, tuntap_log, and TUNTAP_LOG_ERR.
int tuntap_sys_set_ipv4 | ( | struct device * | dev, |
t_tun_in_addr * | s, | ||
uint32_t | bits | ||
) |
References device::ctrl_sock, device::if_name, tuntap_log, and TUNTAP_LOG_ERR.
int tuntap_sys_start | ( | struct device * | dev, |
int | mode, | ||
int | tun | ||
) |
References fd, TUNTAP_MODE_ETHERNET, TUNTAP_MODE_PERSIST, and TUNTAP_MODE_TUNNEL.