Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150485843
D23577.1792478347.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D23577.1792478347.diff
View Options
Index: share/man/man4/divert.4
===================================================================
--- share/man/man4/divert.4
+++ share/man/man4/divert.4
@@ -51,10 +51,19 @@
By reading from and writing to a divert socket, matching packets
can be passed through an arbitrary ``filter'' as they travel through
the host machine, special routing tricks can be done, etc.
+.Pp
+The following sysctls are relevant to the operation of
+.Nm :
+.Bl -tag -width indent
+.It Va net.inet.divert.recvspace
+Receive buffer size for divert sockets (default: 65536).
+.It Va net.inet.divert.sendspace
+Send buffer size for divert sockets (default: 65536).
.Sh READING PACKETS
Packets are diverted either as they are ``incoming'' or ``outgoing.''
Incoming packets are diverted after reception on an IP interface,
whereas outgoing packets are diverted before next hop forwarding.
+.El
.Pp
Diverted packets may be read unaltered via
.Xr read 2 ,
Index: sys/netinet/ip_divert.c
===================================================================
--- sys/netinet/ip_divert.c
+++ sys/netinet/ip_divert.c
@@ -117,8 +117,8 @@
#define V_divcb VNET(divcb)
#define V_divcbinfo VNET(divcbinfo)
-static u_long div_sendspace = DIVSNDQ; /* XXX sysctl ? */
-static u_long div_recvspace = DIVRCVQ; /* XXX sysctl ? */
+static u_long div_sendspace = DIVSNDQ;
+static u_long div_recvspace = DIVRCVQ;
static eventhandler_tag ip_divert_event_tag;
@@ -741,6 +741,10 @@
"IPDIVERT");
SYSCTL_PROC(_net_inet_divert, OID_AUTO, pcblist, CTLTYPE_OPAQUE | CTLFLAG_RD,
NULL, 0, div_pcblist, "S,xinpcb", "List of active divert sockets");
+SYSCTL_ULONG(_net_inet_divert, OID_AUTO, sendspace, CTLFLAG_RW,
+ &div_sendspace, 0, "Send buffer size for divert sockets");
+SYSCTL_ULONG(_net_inet_divert, OID_AUTO, recvspace, CTLFLAG_RW,
+ &div_recvspace, 0, "Receive buffer size for divert sockets");
#endif
struct pr_usrreqs div_usrreqs = {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 20, 6:39 AM (14 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30546862
Default Alt Text
D23577.1792478347.diff (1 KB)
Attached To
Mode
D23577: divert: Add socket options for divert socket's send and receive buffers
Attached
Detach File
Event Timeline
Log In to Comment