projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lint
[unix-history]
/
usr
/
src
/
sys
/
kern
/
uipc_proto.c
diff --git
a/usr/src/sys/kern/uipc_proto.c
b/usr/src/sys/kern/uipc_proto.c
index
a2717be
..
08f2c2c
100644
(file)
--- a/
usr/src/sys/kern/uipc_proto.c
+++ b/
usr/src/sys/kern/uipc_proto.c
@@
-1,11
+1,11
@@
-/* uipc_proto.c 4.
3 81/11/14
*/
+/* uipc_proto.c 4.
9 81/11/30
*/
#include "../h/param.h"
#include "../h/socket.h"
#include "../h/param.h"
#include "../h/socket.h"
-#include "../h/protocol.h"
#include "../h/protosw.h"
#include "../h/mbuf.h"
#include "../h/protosw.h"
#include "../h/mbuf.h"
-#include "../net/inet.h"
+#include "../net/in.h"
+#include "../net/in_systm.h"
/*
* Protocol configuration table and routines to search it.
/*
* Protocol configuration table and routines to search it.
@@
-16,12
+16,12
@@
/*
* Local protocol handler.
*/
/*
* Local protocol handler.
*/
-int pi
_
usrreq();
+int piusrreq();
/*
* TCP/IP protocol family: IP, ICMP, UDP, TCP.
*/
/*
* TCP/IP protocol family: IP, ICMP, UDP, TCP.
*/
-int ip_
input(),ip_output(),ip_ctl
output();
+int ip_output();
int ip_init(),ip_slowtimo(),ip_drain();
int icmp_input();
int icmp_drain();
int ip_init(),ip_slowtimo(),ip_drain();
int icmp_input();
int icmp_drain();
@@
-31,54
+31,54
@@
int udp_init();
int tcp_input(),tcp_ctlinput();
int tcp_usrreq(),tcp_sense();
int tcp_init(),tcp_fasttimo(),tcp_slowtimo(),tcp_drain();
int tcp_input(),tcp_ctlinput();
int tcp_usrreq(),tcp_sense();
int tcp_init(),tcp_fasttimo(),tcp_slowtimo(),tcp_drain();
-int ri
_input(),ri
_ctlinput();
-int ri
_usrreq(),ri_sense
();
+int ri
p_input(),rip_output(),rip
_ctlinput();
+int ri
p_usrreq(),rip_slowtimo
();
struct protosw protosw[] = {
struct protosw protosw[] = {
-{ SOCK_STREAM, PF_
LOCAL,
0, PR_CONNREQUIRED,
+{ SOCK_STREAM, PF_
UNIX,
0, PR_CONNREQUIRED,
0, 0, 0, 0,
0, 0, 0, 0,
- pi
_usrreq, 0, 0
,
+ pi
usrreq
,
0, 0, 0, 0,
},
0, 0, 0, 0,
},
-{ SOCK_DGRAM, PF_
LOCAL,
0, PR_ATOMIC|PR_ADDR,
+{ SOCK_DGRAM, PF_
UNIX,
0, PR_ATOMIC|PR_ADDR,
0, 0, 0, 0,
0, 0, 0, 0,
- pi
_usrreq, 0, 0
,
+ pi
usrreq
,
0, 0, 0, 0,
},
0, 0, 0, 0,
},
-{ SOCK_RDM, PF_
LOCAL,
0, PR_ATOMIC|PR_ADDR,
+{ SOCK_RDM, PF_
UNIX,
0, PR_ATOMIC|PR_ADDR,
0, 0, 0, 0,
0, 0, 0, 0,
- pi
_usrreq, 0, 0
,
+ pi
usrreq
,
0, 0, 0, 0,
},
0, 0, 0, 0,
},
-{ SOCK_RAW, PF_
LOCAL,
0, PR_ATOMIC|PR_ADDR,
+{ SOCK_RAW, PF_
UNIX,
0, PR_ATOMIC|PR_ADDR,
0, 0, 0, 0,
0, 0, 0, 0,
- pi
_usrreq, 0, 0
,
+ pi
usrreq
,
0, 0, 0, 0,
},
{ 0, 0, 0, 0,
0, 0, 0, 0,
},
{ 0, 0, 0, 0,
-
ip_input,
ip_output, 0, 0,
- 0,
0, 0,
+
0,
ip_output, 0, 0,
+ 0,
ip_init, 0, ip_slowtimo, ip_drain,
},
{ 0, 0, IPPROTO_ICMP, 0,
icmp_input, 0, 0, 0,
ip_init, 0, ip_slowtimo, ip_drain,
},
{ 0, 0, IPPROTO_ICMP, 0,
icmp_input, 0, 0, 0,
- 0,
0, 0,
+ 0,
0, 0, 0, icmp_drain,
},
{ SOCK_DGRAM, PF_INET, IPPROTO_UDP, PR_ATOMIC|PR_ADDR,
udp_input, 0, udp_ctlinput, 0,
0, 0, 0, icmp_drain,
},
{ SOCK_DGRAM, PF_INET, IPPROTO_UDP, PR_ATOMIC|PR_ADDR,
udp_input, 0, udp_ctlinput, 0,
- udp_usrreq,
udp_sense, MLEN,
+ udp_usrreq,
udp_init, 0, 0, 0,
},
udp_init, 0, 0, 0,
},
-{ SOCK_STREAM, PF_INET, IPPROTO_TCP, PR_CONNREQUIRED,
+{ SOCK_STREAM, PF_INET, IPPROTO_TCP, PR_CONNREQUIRED
|PR_WANTRCVD
,
tcp_input, 0, tcp_ctlinput, 0,
tcp_input, 0, tcp_ctlinput, 0,
- tcp_usrreq,
tcp_sense, MLEN,
+ tcp_usrreq,
tcp_init, tcp_fasttimo, tcp_slowtimo, tcp_drain,
},
{ SOCK_RAW, PF_INET, IPPROTO_RAW, PR_ATOMIC|PR_ADDR,
tcp_init, tcp_fasttimo, tcp_slowtimo, tcp_drain,
},
{ SOCK_RAW, PF_INET, IPPROTO_RAW, PR_ATOMIC|PR_ADDR,
- ri
_input, 0, ri_ctlinput,
0,
- ri
_usrreq, ri_sense, MLEN
,
- 0, 0,
0,
0,
+ ri
p_input, rip_output, rip_ctlinput,
0,
+ ri
p_usrreq
,
+ 0, 0,
rip_slowtimo,
0,
}
};
}
};
@@
-97,6
+97,7
@@
pfinit()
{
register struct protosw *pr;
{
register struct protosw *pr;
+COUNT(PFINIT);
for (pr = protoswLAST; pr >= protosw; pr--)
if (pr->pr_init)
(*pr->pr_init)();
for (pr = protoswLAST; pr >= protosw; pr--)
if (pr->pr_init)
(*pr->pr_init)();
@@
-112,9
+113,10
@@
pffindtype(family, type)
{
register struct protosw *pr;
{
register struct protosw *pr;
+COUNT(PFFINDTYPE);
if (family == 0)
return (0);
if (family == 0)
return (0);
- for (pr = protosw; pr < protoswLAST; pr++)
+ for (pr = protosw; pr <
=
protoswLAST; pr++)
if (pr->pr_family == family && pr->pr_type == type)
return (pr);
return (0);
if (pr->pr_family == family && pr->pr_type == type)
return (pr);
return (0);
@@
-129,9
+131,10
@@
pffindproto(family, protocol)
{
register struct protosw *pr;
{
register struct protosw *pr;
+COUNT(PFFINDPROTO);
if (family == 0)
return (0);
if (family == 0)
return (0);
- for (pr = protosw; pr < protoswLAST; pr++)
+ for (pr = protosw; pr <
=
protoswLAST; pr++)
if (pr->pr_family == family && pr->pr_protocol == protocol)
return (pr);
return (0);
if (pr->pr_family == family && pr->pr_protocol == protocol)
return (pr);
return (0);