aboutsummaryrefslogtreecommitdiff
path: root/lwip
diff options
context:
space:
mode:
Diffstat (limited to 'lwip')
-rw-r--r--lwip/lwip-hurd.h22
-rw-r--r--lwip/main.c20
-rw-r--r--lwip/options.h2
-rw-r--r--lwip/port/include/netif/hurdtunif.h4
-rw-r--r--lwip/port/netif/hurdtunif.c3
5 files changed, 35 insertions, 16 deletions
diff --git a/lwip/lwip-hurd.h b/lwip/lwip-hurd.h
index 9e05550b..ab722618 100644
--- a/lwip/lwip-hurd.h
+++ b/lwip/lwip-hurd.h
@@ -30,21 +30,21 @@
#include <hurd/trivfs.h>
#include <refcount.h>
-struct port_bucket *lwip_bucket;
-struct port_class *socketport_class;
-struct port_class *addrport_class;
-struct port_class *shutdown_notify_class;
+extern struct port_bucket *lwip_bucket;
+extern struct port_class *socketport_class;
+extern struct port_class *addrport_class;
+extern struct port_class *shutdown_notify_class;
-struct port_class *lwip_protid_portclasses[2];
-struct port_class *lwip_cntl_portclasses[2];
+extern struct port_class *lwip_protid_portclasses[2];
+extern struct port_class *lwip_cntl_portclasses[2];
/* Which portclass to install on the bootstrap port, default to IPv4. */
-int lwip_bootstrap_portclass;
+extern int lwip_bootstrap_portclass;
-mach_port_t fsys_identity;
+extern mach_port_t fsys_identity;
/* Trivfs control structure for lwip. */
-struct trivfs_control *lwipcntl;
+extern struct trivfs_control *lwipcntl;
/* Address family port classes. */
enum
@@ -80,10 +80,10 @@ struct sock_addr
};
/* Owner of the underlying node. */
-uid_t lwip_owner;
+extern uid_t lwip_owner;
/* Group of the underlying node. */
-uid_t lwip_group;
+extern uid_t lwip_group;
struct socket *sock_alloc (void);
void sock_release (struct socket *);
diff --git a/lwip/main.c b/lwip/main.c
index 4dfbe143..373f3935 100644
--- a/lwip/main.c
+++ b/lwip/main.c
@@ -37,13 +37,27 @@
#include <netif/hurdethif.h>
#include <netif/hurdtunif.h>
-#include <startup.h>
+#include "startup.h"
+#include "options.h"
/* Translator initialization */
-extern struct argp lwip_argp;
+struct port_bucket *lwip_bucket;
+struct port_class *socketport_class;
+struct port_class *addrport_class;
+struct port_class *shutdown_notify_class;
-extern struct netif *netif_list;
+struct port_class *lwip_protid_portclasses[2];
+struct port_class *lwip_cntl_portclasses[2];
+
+int lwip_bootstrap_portclass;
+
+uid_t lwip_owner;
+uid_t lwip_group;
+
+mach_port_t fsys_identity;
+
+struct trivfs_control *lwipcntl;
int trivfs_fstype = FSTYPE_MISC;
int trivfs_fsid = 0;
diff --git a/lwip/options.h b/lwip/options.h
index e370fab0..7d1c96c7 100644
--- a/lwip/options.h
+++ b/lwip/options.h
@@ -78,4 +78,6 @@ static const char doc[] = "Interface-specific options before the first \
interface specification apply to the first following interface; otherwise \
they apply to the previously specified interface.";
+extern struct argp lwip_argp;
+
#endif // OPTIONS_H
diff --git a/lwip/port/include/netif/hurdtunif.h b/lwip/port/include/netif/hurdtunif.h
index 65e34ac3..43d55348 100644
--- a/lwip/port/include/netif/hurdtunif.h
+++ b/lwip/port/include/netif/hurdtunif.h
@@ -53,8 +53,8 @@ struct hurdtunif
uint8_t read_blocked;
};
-struct port_class *tunnel_cntlclass;
-struct port_class *tunnel_class;
+extern struct port_class *tunnel_cntlclass;
+extern struct port_class *tunnel_class;
/* Device initialization */
err_t hurdtunif_device_init (struct netif *netif);
diff --git a/lwip/port/netif/hurdtunif.c b/lwip/port/netif/hurdtunif.c
index 728db9ac..6e3676c7 100644
--- a/lwip/port/netif/hurdtunif.c
+++ b/lwip/port/netif/hurdtunif.c
@@ -34,6 +34,9 @@
#include <lwip-hurd.h>
+struct port_class *tunnel_cntlclass;
+struct port_class *tunnel_class;
+
/* Add to the end of the queue */
static void
enqueue (struct pbufqueue *q, struct pbuf *p)