Commit c45f80a2 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Remove option -a.

parent ab6bebf6
......@@ -26,6 +26,7 @@ Run hostapd on the wlan0 interface. Your `/etc/hostapd/hostapd.conf`
should say something like
interface=wlan0
channel=11
ssid=sroam
wpa=2
wpa_passphrase=topsecret
......@@ -58,14 +59,13 @@ You need to specify:
* the nameserver(s) announced over DHCPv4 and RA (`-N`);
* the local UDP port used by the flooding algorithm (`-f`);
* the address and port of two or three remote peers (`-F`) (optional);
* the local address of the DHCPv4 server (`-a`) (optional);
* the set of interfaces used for roaming.
In our example, you could say:
sroamd -P 2001:db8:4444::/48 -P 192.168.44.0/24 \
-f 4444 -F [2001:db8:4444::1234]:4444 \
-N 2001:db8:1234::42 -N 10.0.0.42 -a 192.168.44.1 \
-N 2001:db8:1234::42 -N 10.0.0.42 \
wlan0
The flooding algorithm relies on normal unicast traffic, so the sroamd
......
......@@ -33,7 +33,7 @@ unsigned char dnsv4[16][4];
int numdnsv4 = 0;
static int
setup_dhcpv4_socket(const unsigned char *addr)
setup_dhcpv4_socket()
{
int s, rc, one = 1;
struct sockaddr_in sin;
......@@ -73,8 +73,6 @@ setup_dhcpv4_socket(const unsigned char *addr)
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
if(addr != NULL)
memcpy(&sin.sin_addr, addr, 4);
sin.sin_port = htons(67);
rc = bind(s, (struct sockaddr*)&sin, sizeof(sin));
......@@ -89,9 +87,9 @@ fail:
}
int
dhcpv4_setup(const unsigned char *addr)
dhcpv4_setup()
{
return setup_dhcpv4_socket(addr);
return setup_dhcpv4_socket();
}
void
......
......@@ -25,7 +25,7 @@ extern int numdnsv4;
extern int dhcpv4_socket;
int dhcpv4_setup(const unsigned char *addr);
int dhcpv4_setup(void);
int dhcpv4_receive(void);
void dhcpv4_cleanup(void);
......
......@@ -198,11 +198,9 @@ int
main(int argc, char **argv)
{
int rc, opt;
unsigned char addr4[4] = {0, 0, 0, 0};
const unsigned char zeroes[4] = {0, 0, 0, 0};
while(1) {
opt = getopt(argc, argv, "f:a:P:d:N:F:");
opt = getopt(argc, argv, "f:P:d:N:F:");
if(opt < 0)
break;
......@@ -216,11 +214,6 @@ main(int argc, char **argv)
flood_port = p;
}
break;
case 'a':
rc = inet_pton(AF_INET, optarg, &addr4);
if(rc < 1)
goto usage;
break;
case 'P': {
unsigned char buf[16];
int plen, af;
......@@ -338,7 +331,7 @@ main(int argc, char **argv)
exit(1);
}
rc = dhcpv4_setup(memcmp(addr4, zeroes, 4) == 0 ? NULL : addr4);
rc = dhcpv4_setup();
if(rc < 0) {
perror("dhcpv4_setup");
exit(1);
......@@ -525,7 +518,7 @@ main(int argc, char **argv)
usage:
fprintf(stderr,
"Usage: sroamd [-d level] [-P prefix]... [-N nameserver]... [-a address]\n"
"Usage: sroamd [-d level] [-P prefix]... [-N nameserver]...\n"
" [-f port] [-F addr:port]... [interface]...\n");
exit(1);
}
......@@ -37,11 +37,6 @@ Configure the nameserver address that will be announced to clients over
DHCPv4 or IPv6 RA. This option may be specified multiple times, in which
case all prefixes will be announced to clients.
.TP
.BI \-a " address"
Bind the DHCPv4 server to the given address. This is optional, and if
used must be set to the IPv4 address assigned to the interface or
interfaces that support roaming.
.TP
.BI \-f " port"
Set the local UDP port used by the flooding protocol. If this is not set,
flooding is disabled.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment