Displaying 11 results from an estimated 11 matches for "vpn_packet_t".
2010 Sep 20
0
No subject
...endif
=20
#ifdef HAVE_MINGW
-extern int usleep(long);
+//extern int usleep(long);
#endif
=20
#endif /* __DROPIN_H__ */
diff --git a/src/net.c b/src/net.c
index 08e3cad..9d170d0 100644
--- a/src/net.c
+++ b/src/net.c
@@ -280,6 +280,9 @@
int result, i;
socklen_t len =3D sizeof(result);
vpn_packet_t packet;
+ packet.flag_bits =3D 0;
+ packet.flags.compress =3D 1;
+
static int errors =3D 0;
=20
/* check input from kernel */
diff --git a/src/net.h b/src/net.h
index ab6bd41..7e05d09 100644
--- a/src/net.h
+++ b/src/net.h
@@ -79,11 +79,16 @@
typedef struct vpn_packet_t {
length_t len; /*...
2015 Dec 10
2
[PATCH] Receive multiple packets at a time
...strtol system unsetenv usleep vsyslog writev],
[], [], [#include "src/have.h"]
)
diff --git a/src/net_packet.c b/src/net_packet.c
index e67857c..174db34 100644
--- a/src/net_packet.c
+++ b/src/net_packet.c
@@ -695,31 +695,26 @@ static node_t *try_harder(const sockaddr_t *from, const vpn_packet_t *pkt) {
return n;
}
-void handle_incoming_vpn_data(int sock) {
- vpn_packet_t pkt;
+#ifdef HAVE_RECVMMSG
+#define MAX_MSG 256
+#else
+#define MAX_MSG 1
+#endif
+
+static void handle_incoming_vpn_packet(int sock, vpn_packet_t *pkt, sockaddr_t *from) {
char *hostname;
- sockaddr_t from;
- so...
2011 Jan 03
1
Tinc improvements
...U/64 + 20) /* MTU + flags + seqno + padding + HMAC + compressor overhead */
#define MAXBUFSIZE ((MAXSIZE > 2048 ? MAXSIZE : 2048) + 128) /* Enough room for a request with a MAXSIZEd packet or a 8192 bits RSA key */
#define MAXSOCKETS 128 /* Overkill... */
@@ -79,6 +79,11 @@
typedef struct vpn_packet_t {
length_t len; /* the actual number of bytes in the `data' field */
int priority; /* priority or TOS */
+ struct {
+ uint32_t local:1; /* is this packet sent to a local interface? */
+ uint32_t pmtud:1; /* is this packet used for PMTU discovery? */
+ uint32_t unused:30; /* unus...
2015 Dec 02
5
[PATCH] Receive multiple packets at a time
...-10-02 16:26:36.828841493 +0200
+++ src/net_packet.c 2015-10-02 17:15:05.892051503 +0200
@@ -1057,92 +1057,137 @@
return n;
}
+#ifdef HAVE_RECVMMSG
+#define MAX_MSG 256
+#else
+#define MAX_MSG 1
+#endif
+
void handle_incoming_vpn_data(void *data, int flags) {
listen_socket_t *ls = data;
- vpn_packet_t pkt;
+ vpn_packet_t pkt[MAX_MSG];
char *hostname;
node_id_t nullid = {};
- sockaddr_t addr = {};
- socklen_t addrlen = sizeof addr;
+ sockaddr_t addr[MAX_MSG] = {};
+#ifdef HAVE_RECVMMSG
+ struct mmsghdr msg[MAX_MSG];
+ struct iovec iov[MAX_MSG];
+#else
+ socklen_t addrlen = sizeof addr[0];
+#e...
2015 Dec 10
0
[PATCH] Receive multiple packets at a time
...andle_incoming_vpn_data(), especially
the error checking code.
The function isn't that large now, it might be much better to have
two different implementations. Like this (untested, patch attached):
void handle_incoming_vpn_data(int sock) {
#ifdef HAVE_RECVMMSG
#define MAX_MSG 256
vpn_packet_t pkt[MAX_MSG];
sockaddr_t from[MAX_MSG];
struct mmsghdr msg[MAX_MSG];
struct iovec iov[MAX_MSG];
int num = 1, i;
for(i = 0; i < MAX_MSG; i++)
{
msg[i].msg_hdr.msg_name = &from[i].sa;
msg[i].msg_hdr.msg_namelen =...
2010 Nov 13
3
[PATCH 1/4] Experimental IFF_ONE_QUEUE support for Linux
---
doc/tinc.conf.5.in | 3 +++
src/linux/device.c | 7 +++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/doc/tinc.conf.5.in b/doc/tinc.conf.5.in
index 2bfd5fe..01f7f81 100644
--- a/doc/tinc.conf.5.in
+++ b/doc/tinc.conf.5.in
@@ -255,6 +255,9 @@ a lookup if your DNS server is not responding.
This does not affect resolving hostnames to IP addresses from the
host
2018 Jan 16
3
Windows TAP driver issues
Thanks for the info, that is very helpful. It does look like that
change got back-ported to master, albeit in a different form.
I'll take a look at how OpenVPN does its windows device I/O.
- todd
2015 Dec 02
0
[PATCH] Receive multiple packets at a time
...3 +0200
> @@ -1057,92 +1057,137 @@
> return n;
> }
>
> +#ifdef HAVE_RECVMMSG
> +#define MAX_MSG 256
> +#else
> +#define MAX_MSG 1
> +#endif
> +
> void handle_incoming_vpn_data(void *data, int flags) {
> listen_socket_t *ls = data;
> - vpn_packet_t pkt;
> + vpn_packet_t pkt[MAX_MSG];
> char *hostname;
> node_id_t nullid = {};
> - sockaddr_t addr = {};
> - socklen_t addrlen = sizeof addr;
> + sockaddr_t addr[MAX_MSG] = {};
> +#ifdef HAVE_RECVMMSG
> + struct mmsghdr msg[MAX_M...
2003 Oct 03
0
SIGBUS on SPARCv9
...o be an alignment problem.
I've appended a quick fix for this, which at least makes
tinc not crash any more.
Elrond
-------------- next part --------------
--- route.c~ Thu Jul 31 15:18:34 2003
+++ route.c Fri Oct 3 12:04:54 2003
@@ -174,7 +174,9 @@
static void route_ipv4_unreachable(vpn_packet_t *packet, uint8_t code)
{
- struct ip *hdr;
+ struct ip local_hdr;
+ struct ip *hdr = &local_hdr;
+ struct ip *phdr;
struct icmp *icmp;
struct in_addr ip_src;
@@ -186,7 +188,7 @@
cp();
- hdr = (struct ip *)(packet->data + 14);
+ phdr = (struct ip *)(packet->data + 14);
icm...
1999 Oct 20
3
patch for tinc-0.3
Hi tinc list members,
There were some problems with Ivo's email adresses (both zarq@iname.com
and
zarq@spark.icicle.dhs.org) so I resent the stuff to the mailling list.
=============================================
Hi Ivo,
Hier is een oplossing voor een bugje in flush_queue(), en ook wat andere
troepjes
zoals een tincd scheduler. Dit werkt wat beter, omdat de
2015 Dec 10
3
[PATCH] Receive multiple packets at a time
...ecking code.
>
> The function isn't that large now, it might be much better to have
> two different implementations. Like this (untested, patch attached):
>
> void handle_incoming_vpn_data(int sock) {
>
> #ifdef HAVE_RECVMMSG
> #define MAX_MSG 256
>
> vpn_packet_t pkt[MAX_MSG];
> sockaddr_t from[MAX_MSG];
> struct mmsghdr msg[MAX_MSG];
> struct iovec iov[MAX_MSG];
> int num = 1, i;
>
> for(i = 0; i < MAX_MSG; i++)
> {
> msg[i].msg_hdr.msg_name = &from[i].sa;
>...