[Midnightbsd-cvs] src [10659] trunk/lib/libnetgraph: sync

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Jun 9 15:27:44 EDT 2018


Revision: 10659
          http://svnweb.midnightbsd.org/src/?rev=10659
Author:   laffer1
Date:     2018-06-09 15:27:43 -0400 (Sat, 09 Jun 2018)
Log Message:
-----------
sync

Modified Paths:
--------------
    trunk/lib/libnetgraph/Makefile
    trunk/lib/libnetgraph/debug.c
    trunk/lib/libnetgraph/internal.h
    trunk/lib/libnetgraph/msg.c
    trunk/lib/libnetgraph/netgraph.3
    trunk/lib/libnetgraph/netgraph.h
    trunk/lib/libnetgraph/sock.c

Property Changed:
----------------
    trunk/lib/libnetgraph/netgraph.3

Modified: trunk/lib/libnetgraph/Makefile
===================================================================
--- trunk/lib/libnetgraph/Makefile	2018-06-09 19:27:12 UTC (rev 10658)
+++ trunk/lib/libnetgraph/Makefile	2018-06-09 19:27:43 UTC (rev 10659)
@@ -1,5 +1,5 @@
 # $MidnightBSD$
-# $FreeBSD: src/lib/libnetgraph/Makefile,v 1.12 2007/05/21 02:49:05 deischen Exp $
+# $FreeBSD: stable/10/lib/libnetgraph/Makefile 326105 2017-11-22 21:24:47Z mav $
 # $Whistle: Makefile,v 1.4 1999/01/17 03:41:02 julian Exp $
 
 LIB=		netgraph
@@ -6,7 +6,7 @@
 WARNS?=		3
 MAN=		netgraph.3
 
-SHLIB_MAJOR=	3
+SHLIB_MAJOR=	4
 
 SRCS=		sock.c msg.c debug.c
 INCS=		netgraph.h
@@ -15,7 +15,7 @@
 MLINKS+=	netgraph.3 NgNameNode.3
 MLINKS+=	netgraph.3 NgSendMsg.3
 MLINKS+=	netgraph.3 NgSendAsciiMsg.3
-MLINKS+=	netgraph.3 NgSendMsgReply.3
+MLINKS+=	netgraph.3 NgSendReplyMsg.3
 MLINKS+=	netgraph.3 NgRecvMsg.3
 MLINKS+=	netgraph.3 NgAllocRecvMsg.3
 MLINKS+=	netgraph.3 NgRecvAsciiMsg.3

Modified: trunk/lib/libnetgraph/debug.c
===================================================================
--- trunk/lib/libnetgraph/debug.c	2018-06-09 19:27:12 UTC (rev 10658)
+++ trunk/lib/libnetgraph/debug.c	2018-06-09 19:27:43 UTC (rev 10659)
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libnetgraph/debug.c,v 1.9 2005/10/25 20:58:30 ru Exp $");
+__FBSDID("$FreeBSD: stable/10/lib/libnetgraph/debug.c 279052 2015-02-20 11:52:46Z mav $");
 
 #include <sys/types.h>
 #include <sys/time.h>
@@ -63,7 +63,9 @@
 #include <netgraph/ng_atmllc.h>
 #include <netgraph/ng_bpf.h>
 #include <netgraph/ng_bridge.h>
+#include <netgraph/ng_car.h>
 #include <netgraph/ng_cisco.h>
+#include <netgraph/ng_deflate.h>
 #include <netgraph/ng_device.h>
 #include <netgraph/ng_echo.h>
 #include <netgraph/ng_eiface.h>
@@ -70,6 +72,7 @@
 #include <netgraph/ng_etf.h>
 #include <netgraph/ng_ether.h>
 #include <netgraph/ng_fec.h>
+#include <netgraph/ng_ether_echo.h>
 #include <netgraph/ng_frame_relay.h>
 #include <netgraph/ng_gif.h>
 #include <netgraph/ng_gif_demux.h>
@@ -83,15 +86,20 @@
 #include <netgraph/ng_lmi.h>
 #include <netgraph/ng_mppc.h>
 #include <netgraph/ng_nat.h>
+#include <netgraph/netflow/ng_netflow.h>
 #include <netgraph/ng_one2many.h>
+#include <netgraph/ng_patch.h>
+#include <netgraph/ng_pipe.h>
 #include <netgraph/ng_ppp.h>
 #include <netgraph/ng_pppoe.h>
 #include <netgraph/ng_pptpgre.h>
+#include <netgraph/ng_pred1.h>
 #include <netgraph/ng_rfc1490.h>
 #include <netgraph/ng_socket.h>
 #include <netgraph/ng_source.h>
 #include <netgraph/ng_split.h>
 #include <netgraph/ng_sppp.h>
+#include <netgraph/ng_tag.h>
 #include <netgraph/ng_tcpmss.h>
 #include <netgraph/ng_tee.h>
 #include <netgraph/ng_tty.h>
@@ -131,7 +139,9 @@
 	COOKIE(ATMLLC),
 	COOKIE(BPF),
 	COOKIE(BRIDGE),
+	COOKIE(CAR),
 	COOKIE(CISCO),
+	COOKIE(DEFLATE),
 	COOKIE(DEVICE),
 	COOKIE(ECHO),
 	COOKIE(EIFACE),
@@ -138,6 +148,7 @@
 	COOKIE(ETF),
 	COOKIE(ETHER),
 	COOKIE(FEC),
+	COOKIE(ETHER_ECHO),
 	COOKIE(FRAMERELAY),
 	COOKIE(GIF),
 	COOKIE(GIF_DEMUX),
@@ -152,15 +163,20 @@
 	COOKIE(LMI),
 	COOKIE(MPPC),
 	COOKIE(NAT),
+	COOKIE(NETFLOW),
 	COOKIE(ONE2MANY),
+	COOKIE(PATCH),
+	COOKIE(PIPE),
 	COOKIE(PPP),
 	COOKIE(PPPOE),
 	COOKIE(PPTPGRE),
+	COOKIE(PRED1),
 	COOKIE(RFC1490),
 	COOKIE(SOCKET),
 	COOKIE(SOURCE),
 	COOKIE(SPLIT),
 	COOKIE(SPPP),
+	COOKIE(TAG),
 	COOKIE(TCPMSS),
 	COOKIE(TEE),
 	COOKIE(TTY),
@@ -184,9 +200,8 @@
 {
 	int old = _gNgDebugLevel;
 
-	if (level < 0)
-		level = old;
-	_gNgDebugLevel = level;
+	if (level >= 0)
+		_gNgDebugLevel = level;
 	return (old);
 }
 
@@ -228,10 +243,10 @@
 	/* Display header stuff */
 	NGLOGX("NG_MESG :");
 	NGLOGX("  vers   %d", msg->header.version);
-	NGLOGX("  arglen %d", msg->header.arglen);
-	NGLOGX("  flags  %ld", msg->header.flags);
-	NGLOGX("  token  %lu", (u_long)msg->header.token);
-	NGLOGX("  cookie %s (%d)",
+	NGLOGX("  arglen %u", msg->header.arglen);
+	NGLOGX("  flags  %x", msg->header.flags);
+	NGLOGX("  token  %u", msg->header.token);
+	NGLOGX("  cookie %s (%u)",
 	    NgCookie(msg->header.typecookie), msg->header.typecookie);
 
 	/* At lower debugging levels, skip ASCII translation */

Modified: trunk/lib/libnetgraph/internal.h
===================================================================
--- trunk/lib/libnetgraph/internal.h	2018-06-09 19:27:12 UTC (rev 10658)
+++ trunk/lib/libnetgraph/internal.h	2018-06-09 19:27:43 UTC (rev 10659)
@@ -37,7 +37,7 @@
  *
  * Author: Archie Cobbs <archie at whistle.com>
  *
- * $FreeBSD: src/lib/libnetgraph/internal.h,v 1.5 2007/05/14 14:18:41 mav Exp $
+ * $FreeBSD: stable/10/lib/libnetgraph/internal.h 169551 2007-05-14 14:18:41Z mav $
  * $Whistle: internal.h,v 1.5 1999/01/20 00:57:22 archie Exp $
  */
 

Modified: trunk/lib/libnetgraph/msg.c
===================================================================
--- trunk/lib/libnetgraph/msg.c	2018-06-09 19:27:12 UTC (rev 10658)
+++ trunk/lib/libnetgraph/msg.c	2018-06-09 19:27:43 UTC (rev 10659)
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libnetgraph/msg.c,v 1.14 2007/05/14 14:18:41 mav Exp $");
+__FBSDID("$FreeBSD: stable/10/lib/libnetgraph/msg.c 248159 2013-03-11 13:05:11Z glebius $");
 
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -235,7 +235,7 @@
 	}
 
 	/* Wait for reply if there should be one. */
-	if (msg->header.cmd & NGM_HASREPLY) {
+	if (msg->header.cmd & NGM_HASREPLY && !(msg->header.flags & NGF_RESP)) {
 		struct pollfd rfds;
 		int n;
 

Modified: trunk/lib/libnetgraph/netgraph.3
===================================================================
--- trunk/lib/libnetgraph/netgraph.3	2018-06-09 19:27:12 UTC (rev 10658)
+++ trunk/lib/libnetgraph/netgraph.3	2018-06-09 19:27:43 UTC (rev 10659)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
 .\" Copyright (c) 1996-1999 Whistle Communications, Inc.
 .\" All rights reserved.
 .\"
@@ -32,11 +33,10 @@
 .\"
 .\" Author: Archie Cobbs <archie at whistle.com>
 .\"
-.\" $MidnightBSD$
-.\" $FreeBSD: src/lib/libnetgraph/netgraph.3,v 1.23 2004/07/04 04:03:37 jmallett Exp $
+.\" $FreeBSD: stable/10/lib/libnetgraph/netgraph.3 326105 2017-11-22 21:24:47Z mav $
 .\" $Whistle: netgraph.3,v 1.7 1999/01/25 07:14:06 archie Exp $
 .\"
-.Dd January 27, 2004
+.Dd November 25, 2013
 .Dt NETGRAPH 3
 .Os
 .Sh NAME
@@ -44,7 +44,7 @@
 .Nm NgNameNode ,
 .Nm NgSendMsg ,
 .Nm NgSendAsciiMsg ,
-.Nm NgSendMsgReply ,
+.Nm NgSendReplyMsg ,
 .Nm NgRecvMsg ,
 .Nm NgAllocRecvMsg ,
 .Nm NgRecvAsciiMsg ,
@@ -58,7 +58,7 @@
 .Sh LIBRARY
 .Lb libnetgraph
 .Sh SYNOPSIS
-.In netgraph.h
+.In netgraph/netgraph.h
 .Ft int
 .Fn NgMkSockNode "const char *name" "int *csp" "int *dsp"
 .Ft int
@@ -71,7 +71,7 @@
 .Ft int
 .Fn NgSendAsciiMsg "int cs" "const char *path" "const char *fmt" ...
 .Ft int
-.Fo NgSendMsgReply
+.Fo NgSendReplyMsg
 .Fa "int cs" "const char *path" "struct ng_mesg *msg" "const void *arg"
 .Fa "size_t arglen"
 .Fc
@@ -163,7 +163,7 @@
 This value is typically used to associate replies.
 .Pp
 Use
-.Fn NgSendMsgReply
+.Fn NgSendReplyMsg
 to send reply to a previously received control message.
 The original message header should be pointed to by
 .Fa msg .


Property changes on: trunk/lib/libnetgraph/netgraph.3
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/lib/libnetgraph/netgraph.h
===================================================================
--- trunk/lib/libnetgraph/netgraph.h	2018-06-09 19:27:12 UTC (rev 10658)
+++ trunk/lib/libnetgraph/netgraph.h	2018-06-09 19:27:43 UTC (rev 10659)
@@ -37,7 +37,7 @@
  *
  * Author: Archie Cobbs <archie at whistle.com>
  *
- * $FreeBSD: src/lib/libnetgraph/netgraph.h,v 1.4 2004/01/27 20:25:14 ru Exp $
+ * $FreeBSD: stable/10/lib/libnetgraph/netgraph.h 125113 2004-01-27 20:25:14Z ru $
  * $Whistle: netgraph.h,v 1.7 1999/01/20 00:57:23 archie Exp $
  */
 

Modified: trunk/lib/libnetgraph/sock.c
===================================================================
--- trunk/lib/libnetgraph/sock.c	2018-06-09 19:27:12 UTC (rev 10658)
+++ trunk/lib/libnetgraph/sock.c	2018-06-09 19:27:43 UTC (rev 10659)
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libnetgraph/sock.c,v 1.9 2006/10/17 16:56:29 glebius Exp $");
+__FBSDID("$FreeBSD: stable/10/lib/libnetgraph/sock.c 244538 2012-12-21 15:54:13Z kevlo $");
 
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -72,10 +72,10 @@
 		name = NULL;
 
 	/* Create control socket; this also creates the netgraph node.
-	   If we get an EPROTONOSUPPORT then the socket node type is
+	   If we get an EAFNOSUPPORT then the socket node type is
 	   not loaded, so load it and try again. */
 	if ((cs = socket(AF_NETGRAPH, SOCK_DGRAM, NG_CONTROL)) < 0) {
-		if (errno == EPROTONOSUPPORT) {
+		if (errno == EAFNOSUPPORT) {
 			if (kldload(NG_SOCKET_KLD) < 0) {
 				errnosv = errno;
 				if (_gNgDebugLevel >= 1)



More information about the Midnightbsd-cvs mailing list