summaryrefslogtreecommitdiff
path: root/sys/src/9/ip/icmp.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-03-19 01:11:08 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2018-03-19 01:11:08 +0100
commit547f60b4c507778099635f5d2ec4919e1beb6a57 (patch)
tree054f072e361b27b433515e4688eb33555bfc340f /sys/src/9/ip/icmp.c
parent20cbb88e32ece30dd984ab658c365f574790d6ba (diff)
devip: pick source address for neighbor solicitations as of rfc4861 7.2.2, cleanup
rfc4861 7.2.2: If the source address of the packet prompting the solicitation is the same as one of the addresses assigned to the outgoing interface, that address SHOULD be placed in the IP Source Address of the outgoing solicitation. this change adds ndbsendsol() which handles the source address selection and also handles the arp table locking; avoiding access to the arp entry after the arp table is unlocked. cleanups: - use ipmove() instead of memmove(). - useless extern qualifiers
Diffstat (limited to 'sys/src/9/ip/icmp.c')
-rw-r--r--sys/src/9/ip/icmp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/src/9/ip/icmp.c b/sys/src/9/ip/icmp.c
index b063d5da5..21f226c7f 100644
--- a/sys/src/9/ip/icmp.c
+++ b/sys/src/9/ip/icmp.c
@@ -113,7 +113,7 @@ icmpcreate(Conv *c)
c->wq = qbypass(icmpkick, c);
}
-extern char*
+char*
icmpconnect(Conv *c, char **argv, int argc)
{
char *e;
@@ -126,7 +126,7 @@ icmpconnect(Conv *c, char **argv, int argc)
return nil;
}
-extern int
+int
icmpstate(Conv *c, char *state, int n)
{
USED(c);
@@ -137,7 +137,7 @@ icmpstate(Conv *c, char *state, int n)
);
}
-extern char*
+char*
icmpannounce(Conv *c, char **argv, int argc)
{
char *e;
@@ -150,7 +150,7 @@ icmpannounce(Conv *c, char **argv, int argc)
return nil;
}
-extern void
+void
icmpclose(Conv *c)
{
qclose(c->rq);
@@ -214,7 +214,7 @@ ip4me(Fs *f, uchar ip4[4])
return (ipforme(f, addr) & Runi) != 0;
}
-extern void
+void
icmpttlexceeded(Fs *f, uchar *ia, Block *bp)
{
Block *nbp;
@@ -270,13 +270,13 @@ icmpunreachable(Fs *f, Block *bp, int code, int seq)
ipoput4(f, nbp, 0, MAXTTL, DFLTTOS, nil);
}
-extern void
+void
icmpnoconv(Fs *f, Block *bp)
{
icmpunreachable(f, bp, 3, 0);
}
-extern void
+void
icmpcantfrag(Fs *f, Block *bp, int mtu)
{
icmpunreachable(f, bp, 4, mtu);