tunemu naming convention change

This commit is contained in:
Friedrich Schöller 2009-08-03 05:55:03 +02:00
parent 3f13e25b93
commit 55cc53c858
3 changed files with 20 additions and 20 deletions

View File

@ -22,23 +22,23 @@
int tun_open(char *dev)
{
int fd = tun_emu_open(dev);
int fd = tunemu_open(dev);
if (fd < 0)
syslog(LOG_ERR, tun_emu_error);
syslog(LOG_ERR, tunemu_error);
return fd;
}
int tun_close(int fd, char *dev)
{
return tun_emu_close(fd);
return tunemu_close(fd);
}
int tun_write(int fd, char *buf, int len)
{
return tun_emu_write(fd, buf, len);
return tunemu_write(fd, buf, len);
}
int tun_read(int fd, char *buf, int len)
{
return tun_emu_read(fd, buf, len);
return tunemu_read(fd, buf, len);
}

View File

@ -70,7 +70,7 @@ struct npioctl
#define ERROR_BUFFER_SIZE 1024
char tun_emu_error[ERROR_BUFFER_SIZE];
char tunemu_error[ERROR_BUFFER_SIZE];
static int pcap_use_count = 0;
static pcap_t *pcap = NULL;
@ -82,13 +82,13 @@ static void tun_error(char *format, ...)
{
va_list vl;
va_start(vl, format);
vsnprintf(tun_emu_error, ERROR_BUFFER_SIZE, format, vl);
vsnprintf(tunemu_error, ERROR_BUFFER_SIZE, format, vl);
va_end(vl);
}
static void tun_noerror()
{
*tun_emu_error = 0;
*tunemu_error = 0;
}
static int ppp_new_instance()
@ -205,7 +205,7 @@ static void allocate_data_buffer(int size)
}
}
int tun_emu_open(tun_emu_device device)
int tunemu_open(tunemu_device device)
{
int ppp_unit_number = -1;
int ppp_unit_fd = ppp_new_unit(&ppp_unit_number);
@ -229,7 +229,7 @@ int tun_emu_open(tun_emu_device device)
return ppp_unit_fd;
}
int tun_emu_close(int ppp_sockfd)
int tunemu_close(int ppp_sockfd)
{
int ret = close(ppp_sockfd);
@ -239,7 +239,7 @@ int tun_emu_close(int ppp_sockfd)
return ret;
}
int tun_emu_read(int ppp_sockfd, char *buffer, int length)
int tunemu_read(int ppp_sockfd, char *buffer, int length)
{
allocate_data_buffer(length + 2);
@ -260,7 +260,7 @@ int tun_emu_read(int ppp_sockfd, char *buffer, int length)
return length;
}
int tun_emu_write(int ppp_sockfd, char *buffer, int length)
int tunemu_write(int ppp_sockfd, char *buffer, int length)
{
allocate_data_buffer(length + 4);

View File

@ -17,16 +17,16 @@
*
*/
#ifndef TUN_EMU_H
#define TUN_EMU_H
#ifndef TUNEMU_H
#define TUNEMU_H
typedef char tun_emu_device[7];
typedef char tunemu_device[7];
extern char tun_emu_error[];
extern char tunemu_error[];
int tun_emu_open(tun_emu_device dev);
int tun_emu_close(int fd);
int tun_emu_read(int fd, char *buffer, int length);
int tun_emu_write(int fd, char *buffer, int length);
int tunemu_open(tunemu_device dev);
int tunemu_close(int fd);
int tunemu_read(int fd, char *buffer, int length);
int tunemu_write(int fd, char *buffer, int length);
#endif