Re: svn commit: r345797 - in head: contrib/bsnmp/gensnmptree contrib/bsnmp/lib contrib/bsnmp/snmpd lib/libbsnmp/libbsnmp usr.sbin/bsnmpd/bsnmpd

2019-09-03 Thread Gleb Smirnoff
  Hi Harti,

On Tue, Apr 02, 2019 at 04:24:10PM +0200, Harti Brandt wrote:
H> BD>Jumping in this commit, maybe it is time to move bsnmpd out of contrib, 
given
H> BD>that all the dev appears to only be in our own source tree right?
H> 
H> Actually I have a private tree that has some more stuff in it than there 
H> is in the contrib tree in FreeBSD. I usually do modifications first in 
H> that tree, then I bring it to FreeBSD. If somebody commits modifications 
H> to FreeBSD I feed that back.
H> 
H> One day I intend to put this into a public place.

With your current setup already there is no point in having bsnmpd in contrib/.

The normal software in contrib/ has a public upstream repo and releases. It can
be imported into vendor SVN namespaces, and after that merged with svn into
src/contrib. AFAIR, this was the case for bsnmpd in the past.

Your current development setup virtually has no difference to any other FreeBSD
developer that has local patches in /usr/src, or own fork of FreeBSD on github
with modifications in area of interest.

-- 
Gleb Smirnoff


___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r345797 - in head: contrib/bsnmp/gensnmptree contrib/bsnmp/lib contrib/bsnmp/snmpd lib/libbsnmp/libbsnmp usr.sbin/bsnmpd/bsnmpd

2019-09-03 Thread Harti Brandt
On Tue, 2 Apr 2019, Baptiste Daroussin wrote:

BD>On Tue, Apr 02, 2019 at 12:50:01PM +, Andrey V. Elsukov wrote:
BD>> Author: ae
BD>> Date: Tue Apr  2 12:50:01 2019
BD>> New Revision: 345797
BD>> URL: https://svnweb.freebsd.org/changeset/base/345797
BD>> 
BD>> Log:
BD>>   Add IPv6 transport for bsnmp.
BD>>   
BD>>   This patch adds a new table begemotSnmpdTransInetTable that uses the
BD>>   InetAddressType textual convention and can be used to create listening
BD>>   ports for IPv4, IPv6, zoned IPv6 and based on DNS names. It also supports
BD>>   future extension beyond UDP by adding a protocol identifier to the table
BD>>   index. In order to support this gensnmptree had to be modified.
BD>>   
BD>>   Submitted by:   harti
BD>>   MFC after:  1 month
BD>>   Relnotes:   yes
BD>>   Differential Revision:  https://reviews.freebsd.org/D16654
BD>> 
BD>Jumping in this commit, maybe it is time to move bsnmpd out of contrib, given
BD>that all the dev appears to only be in our own source tree right?

Actually I have a private tree that has some more stuff in it than there 
is in the contrib tree in FreeBSD. I usually do modifications first in 
that tree, then I bring it to FreeBSD. If somebody commits modifications 
to FreeBSD I feed that back.

One day I intend to put this into a public place.

harti


___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r345797 - in head: contrib/bsnmp/gensnmptree contrib/bsnmp/lib contrib/bsnmp/snmpd lib/libbsnmp/libbsnmp usr.sbin/bsnmpd/bsnmpd

2019-09-03 Thread Andrey V. Elsukov
On 02.04.2019 16:40, Baptiste Daroussin wrote:
>> URL: https://svnweb.freebsd.org/changeset/base/345797
>>
>> Log:
>>   Add IPv6 transport for bsnmp.
>>   
>>   This patch adds a new table begemotSnmpdTransInetTable that uses the
>>   InetAddressType textual convention and can be used to create listening
>>   ports for IPv4, IPv6, zoned IPv6 and based on DNS names. It also supports
>>   future extension beyond UDP by adding a protocol identifier to the table
>>   index. In order to support this gensnmptree had to be modified.
>>   
>>   Submitted by:   harti
>>   MFC after:  1 month
>>   Relnotes:   yes
>>   Differential Revision:  https://reviews.freebsd.org/D16654
>>
> Jumping in this commit, maybe it is time to move bsnmpd out of contrib, given
> that all the dev appears to only be in our own source tree right?

I think it is better to ask harti@

-- 
WBR, Andrey V. Elsukov



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r345797 - in head: contrib/bsnmp/gensnmptree contrib/bsnmp/lib contrib/bsnmp/snmpd lib/libbsnmp/libbsnmp usr.sbin/bsnmpd/bsnmpd

2019-09-03 Thread Baptiste Daroussin
On Tue, Apr 02, 2019 at 12:50:01PM +, Andrey V. Elsukov wrote:
> Author: ae
> Date: Tue Apr  2 12:50:01 2019
> New Revision: 345797
> URL: https://svnweb.freebsd.org/changeset/base/345797
> 
> Log:
>   Add IPv6 transport for bsnmp.
>   
>   This patch adds a new table begemotSnmpdTransInetTable that uses the
>   InetAddressType textual convention and can be used to create listening
>   ports for IPv4, IPv6, zoned IPv6 and based on DNS names. It also supports
>   future extension beyond UDP by adding a protocol identifier to the table
>   index. In order to support this gensnmptree had to be modified.
>   
>   Submitted by:   harti
>   MFC after:  1 month
>   Relnotes:   yes
>   Differential Revision:  https://reviews.freebsd.org/D16654
> 
Jumping in this commit, maybe it is time to move bsnmpd out of contrib, given
that all the dev appears to only be in our own source tree right?

Best regards,
Bapt


signature.asc
Description: PGP signature


svn commit: r345797 - in head: contrib/bsnmp/gensnmptree contrib/bsnmp/lib contrib/bsnmp/snmpd lib/libbsnmp/libbsnmp usr.sbin/bsnmpd/bsnmpd

2019-09-03 Thread Andrey V. Elsukov
Author: ae
Date: Tue Apr  2 12:50:01 2019
New Revision: 345797
URL: https://svnweb.freebsd.org/changeset/base/345797

Log:
  Add IPv6 transport for bsnmp.
  
  This patch adds a new table begemotSnmpdTransInetTable that uses the
  InetAddressType textual convention and can be used to create listening
  ports for IPv4, IPv6, zoned IPv6 and based on DNS names. It also supports
  future extension beyond UDP by adding a protocol identifier to the table
  index. In order to support this gensnmptree had to be modified.
  
  Submitted by:   harti
  MFC after:  1 month
  Relnotes:   yes
  Differential Revision:  https://reviews.freebsd.org/D16654

Added:
  head/contrib/bsnmp/snmpd/trans_inet.c
  head/contrib/bsnmp/snmpd/trans_inet.h
Modified:
  head/contrib/bsnmp/gensnmptree/gensnmptree.1
  head/contrib/bsnmp/gensnmptree/gensnmptree.c
  head/contrib/bsnmp/lib/snmpclient.c
  head/contrib/bsnmp/lib/snmpclient.h
  head/contrib/bsnmp/lib/tc.def
  head/contrib/bsnmp/snmpd/BEGEMOT-SNMPD.txt
  head/contrib/bsnmp/snmpd/main.c
  head/contrib/bsnmp/snmpd/snmpd.config
  head/contrib/bsnmp/snmpd/snmpd.h
  head/contrib/bsnmp/snmpd/snmpmod.h
  head/contrib/bsnmp/snmpd/trans_lsock.c
  head/contrib/bsnmp/snmpd/trans_udp.c
  head/contrib/bsnmp/snmpd/tree.def
  head/lib/libbsnmp/libbsnmp/Makefile
  head/usr.sbin/bsnmpd/bsnmpd/Makefile
  head/usr.sbin/bsnmpd/bsnmpd/snmpd.config

Modified: head/contrib/bsnmp/gensnmptree/gensnmptree.1
==
--- head/contrib/bsnmp/gensnmptree/gensnmptree.1Tue Apr  2 12:02:35 
2019(r345796)
+++ head/contrib/bsnmp/gensnmptree/gensnmptree.1Tue Apr  2 12:50:01 
2019(r345797)
@@ -31,7 +31,7 @@
 .\"
 .\" $Begemot: gensnmptree.1 383 2006-05-30 07:40:49Z brandt_h $
 .\"
-.Dd June 29, 2018
+.Dd April 2, 2019
 .Dt GENSNMPTREE 1
 .Os
 .Sh NAME
@@ -100,25 +100,11 @@ is the length of the OID.
 is the last component of the OID.
 .El
 .It Fl F
-Together with
-.Fl E
-causes
-.Nm
-instead of the generation of enum definitions the generation of
-functions for checking a value to be one of the enumeration variants and
-for conversion between strings and the enum. The file is sent to standard
-output and is meant to be included into a C-file for compilation.
+emit definitions for C-functions includeable in a C-file that do some basic
+stuff on enums like value checking and conversion between value and strings.
 .It Fl f
-This flag can be used together with
-.Fl E
-or when generating the tree files. It causes
-.Nm
-to emit static inline functions for checking a value to be one of the
-enumeration values and for conversion between strings and the enum.
-If used when generating the tree files, the preprocessor symbol
-.Ar SNMPTREE_TYPES
-must be defined when including the tree header file for these definitions
-to become visible.
+emit definitions for inline C-functions that do some basic
+stuff on enums like value checking and conversion between value and strings.
 .It Fl h
 Print a short help page.
 .It Fl I Ar directory
@@ -136,36 +122,6 @@ Instead of normal output print the resulting tree.
 Prefix the file names and the table name with
 .Ar prefix .
 .El
-.Pp
-The following functions are generated by
-.Fl f
-or
-.Fl F :
-.Pp
-.Ft static inline int
-.Fn isok_EnumName "enum EnumName" ;
-.Pp
-.Ft static inline const char *
-.Fn tostr_EnumName "enum EnumName" ;
-.Pp
-.Ft static inline int
-.Fn fromstr_EnumName "const char *" "enum EnumName *" ;
-.Pp
-The
-.Fa EnumName
-is replaced with the enumeration name.
-.Fn isok_EnumName
-returns 1 if the argument is one of the valid enum values and 0 otherwise.
-.Fn tostr_EnumName
-returns a string representation of the enumeration value.
-If the values is not one of the legal values
-.Ar EnumName???
-is returned.
-.Fn fromstr_EnumName
-returns 1 if the string represents one of the legal enumeration values and
-0 otherwise.
-If 1 is return the variable pointed to by the second argument is set to
-the enumeration value.
 .Sh MIBS
 The syntax of the MIB description file can formally be specified as follows:
 .Bd -unfilled -offset indent

Modified: head/contrib/bsnmp/gensnmptree/gensnmptree.c
==
--- head/contrib/bsnmp/gensnmptree/gensnmptree.cTue Apr  2 12:02:35 
2019(r345796)
+++ head/contrib/bsnmp/gensnmptree/gensnmptree.cTue Apr  2 12:50:01 
2019(r345797)
@@ -110,7 +110,6 @@ static int debug;
 
 static const char usgtxt[] = "\
 Generate SNMP tables.\n\
-$Id$\n\
 usage: gensnmptree [-dEeFfhlt] [-I directory] [-i infile] [-p prefix]\n\
[name]...\n\
 options:\n\
@@ -127,6 +126,37 @@ options:\n\
   -t   generate a .def file\n\
 ";
 
+/**
+ * Program operation.
+ */
+enum op {
+   /** generate the tree */
+   OP_GEN,
+
+   /** extract OIDs */
+   OP_EXTRACT,
+
+   /** print the parsed tree */
+   OP_TREE,
+
+   /** extract 

Re: svn commit: r345797 - in head: contrib/bsnmp/gensnmptree contrib/bsnmp/lib contrib/bsnmp/snmpd lib/libbsnmp/libbsnmp usr.sbin/bsnmpd/bsnmpd

2019-04-03 Thread Gleb Smirnoff
  Hi Harti,

On Tue, Apr 02, 2019 at 04:24:10PM +0200, Harti Brandt wrote:
H> BD>Jumping in this commit, maybe it is time to move bsnmpd out of contrib, 
given
H> BD>that all the dev appears to only be in our own source tree right?
H> 
H> Actually I have a private tree that has some more stuff in it than there 
H> is in the contrib tree in FreeBSD. I usually do modifications first in 
H> that tree, then I bring it to FreeBSD. If somebody commits modifications 
H> to FreeBSD I feed that back.
H> 
H> One day I intend to put this into a public place.

With your current setup already there is no point in having bsnmpd in contrib/.

The normal software in contrib/ has a public upstream repo and releases. It can
be imported into vendor SVN namespaces, and after that merged with svn into
src/contrib. AFAIR, this was the case for bsnmpd in the past.

Your current development setup virtually has no difference to any other FreeBSD
developer that has local patches in /usr/src, or own fork of FreeBSD on github
with modifications in area of interest.

-- 
Gleb Smirnoff
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r345797 - in head: contrib/bsnmp/gensnmptree contrib/bsnmp/lib contrib/bsnmp/snmpd lib/libbsnmp/libbsnmp usr.sbin/bsnmpd/bsnmpd

2019-04-02 Thread Harti Brandt
On Tue, 2 Apr 2019, Baptiste Daroussin wrote:

BD>On Tue, Apr 02, 2019 at 12:50:01PM +, Andrey V. Elsukov wrote:
BD>> Author: ae
BD>> Date: Tue Apr  2 12:50:01 2019
BD>> New Revision: 345797
BD>> URL: https://svnweb.freebsd.org/changeset/base/345797
BD>> 
BD>> Log:
BD>>   Add IPv6 transport for bsnmp.
BD>>   
BD>>   This patch adds a new table begemotSnmpdTransInetTable that uses the
BD>>   InetAddressType textual convention and can be used to create listening
BD>>   ports for IPv4, IPv6, zoned IPv6 and based on DNS names. It also supports
BD>>   future extension beyond UDP by adding a protocol identifier to the table
BD>>   index. In order to support this gensnmptree had to be modified.
BD>>   
BD>>   Submitted by:   harti
BD>>   MFC after:  1 month
BD>>   Relnotes:   yes
BD>>   Differential Revision:  https://reviews.freebsd.org/D16654
BD>> 
BD>Jumping in this commit, maybe it is time to move bsnmpd out of contrib, given
BD>that all the dev appears to only be in our own source tree right?

Actually I have a private tree that has some more stuff in it than there 
is in the contrib tree in FreeBSD. I usually do modifications first in 
that tree, then I bring it to FreeBSD. If somebody commits modifications 
to FreeBSD I feed that back.

One day I intend to put this into a public place.

harti
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r345797 - in head: contrib/bsnmp/gensnmptree contrib/bsnmp/lib contrib/bsnmp/snmpd lib/libbsnmp/libbsnmp usr.sbin/bsnmpd/bsnmpd

2019-04-02 Thread Andrey V. Elsukov
On 02.04.2019 16:40, Baptiste Daroussin wrote:
>> URL: https://svnweb.freebsd.org/changeset/base/345797
>>
>> Log:
>>   Add IPv6 transport for bsnmp.
>>   
>>   This patch adds a new table begemotSnmpdTransInetTable that uses the
>>   InetAddressType textual convention and can be used to create listening
>>   ports for IPv4, IPv6, zoned IPv6 and based on DNS names. It also supports
>>   future extension beyond UDP by adding a protocol identifier to the table
>>   index. In order to support this gensnmptree had to be modified.
>>   
>>   Submitted by:   harti
>>   MFC after:  1 month
>>   Relnotes:   yes
>>   Differential Revision:  https://reviews.freebsd.org/D16654
>>
> Jumping in this commit, maybe it is time to move bsnmpd out of contrib, given
> that all the dev appears to only be in our own source tree right?

I think it is better to ask harti@

-- 
WBR, Andrey V. Elsukov



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r345797 - in head: contrib/bsnmp/gensnmptree contrib/bsnmp/lib contrib/bsnmp/snmpd lib/libbsnmp/libbsnmp usr.sbin/bsnmpd/bsnmpd

2019-04-02 Thread Baptiste Daroussin
On Tue, Apr 02, 2019 at 12:50:01PM +, Andrey V. Elsukov wrote:
> Author: ae
> Date: Tue Apr  2 12:50:01 2019
> New Revision: 345797
> URL: https://svnweb.freebsd.org/changeset/base/345797
> 
> Log:
>   Add IPv6 transport for bsnmp.
>   
>   This patch adds a new table begemotSnmpdTransInetTable that uses the
>   InetAddressType textual convention and can be used to create listening
>   ports for IPv4, IPv6, zoned IPv6 and based on DNS names. It also supports
>   future extension beyond UDP by adding a protocol identifier to the table
>   index. In order to support this gensnmptree had to be modified.
>   
>   Submitted by:   harti
>   MFC after:  1 month
>   Relnotes:   yes
>   Differential Revision:  https://reviews.freebsd.org/D16654
> 
Jumping in this commit, maybe it is time to move bsnmpd out of contrib, given
that all the dev appears to only be in our own source tree right?

Best regards,
Bapt


signature.asc
Description: PGP signature


svn commit: r345797 - in head: contrib/bsnmp/gensnmptree contrib/bsnmp/lib contrib/bsnmp/snmpd lib/libbsnmp/libbsnmp usr.sbin/bsnmpd/bsnmpd

2019-04-02 Thread Andrey V. Elsukov
Author: ae
Date: Tue Apr  2 12:50:01 2019
New Revision: 345797
URL: https://svnweb.freebsd.org/changeset/base/345797

Log:
  Add IPv6 transport for bsnmp.
  
  This patch adds a new table begemotSnmpdTransInetTable that uses the
  InetAddressType textual convention and can be used to create listening
  ports for IPv4, IPv6, zoned IPv6 and based on DNS names. It also supports
  future extension beyond UDP by adding a protocol identifier to the table
  index. In order to support this gensnmptree had to be modified.
  
  Submitted by:   harti
  MFC after:  1 month
  Relnotes:   yes
  Differential Revision:  https://reviews.freebsd.org/D16654

Added:
  head/contrib/bsnmp/snmpd/trans_inet.c
  head/contrib/bsnmp/snmpd/trans_inet.h
Modified:
  head/contrib/bsnmp/gensnmptree/gensnmptree.1
  head/contrib/bsnmp/gensnmptree/gensnmptree.c
  head/contrib/bsnmp/lib/snmpclient.c
  head/contrib/bsnmp/lib/snmpclient.h
  head/contrib/bsnmp/lib/tc.def
  head/contrib/bsnmp/snmpd/BEGEMOT-SNMPD.txt
  head/contrib/bsnmp/snmpd/main.c
  head/contrib/bsnmp/snmpd/snmpd.config
  head/contrib/bsnmp/snmpd/snmpd.h
  head/contrib/bsnmp/snmpd/snmpmod.h
  head/contrib/bsnmp/snmpd/trans_lsock.c
  head/contrib/bsnmp/snmpd/trans_udp.c
  head/contrib/bsnmp/snmpd/tree.def
  head/lib/libbsnmp/libbsnmp/Makefile
  head/usr.sbin/bsnmpd/bsnmpd/Makefile
  head/usr.sbin/bsnmpd/bsnmpd/snmpd.config

Modified: head/contrib/bsnmp/gensnmptree/gensnmptree.1
==
--- head/contrib/bsnmp/gensnmptree/gensnmptree.1Tue Apr  2 12:02:35 
2019(r345796)
+++ head/contrib/bsnmp/gensnmptree/gensnmptree.1Tue Apr  2 12:50:01 
2019(r345797)
@@ -31,7 +31,7 @@
 .\"
 .\" $Begemot: gensnmptree.1 383 2006-05-30 07:40:49Z brandt_h $
 .\"
-.Dd June 29, 2018
+.Dd April 2, 2019
 .Dt GENSNMPTREE 1
 .Os
 .Sh NAME
@@ -100,25 +100,11 @@ is the length of the OID.
 is the last component of the OID.
 .El
 .It Fl F
-Together with
-.Fl E
-causes
-.Nm
-instead of the generation of enum definitions the generation of
-functions for checking a value to be one of the enumeration variants and
-for conversion between strings and the enum. The file is sent to standard
-output and is meant to be included into a C-file for compilation.
+emit definitions for C-functions includeable in a C-file that do some basic
+stuff on enums like value checking and conversion between value and strings.
 .It Fl f
-This flag can be used together with
-.Fl E
-or when generating the tree files. It causes
-.Nm
-to emit static inline functions for checking a value to be one of the
-enumeration values and for conversion between strings and the enum.
-If used when generating the tree files, the preprocessor symbol
-.Ar SNMPTREE_TYPES
-must be defined when including the tree header file for these definitions
-to become visible.
+emit definitions for inline C-functions that do some basic
+stuff on enums like value checking and conversion between value and strings.
 .It Fl h
 Print a short help page.
 .It Fl I Ar directory
@@ -136,36 +122,6 @@ Instead of normal output print the resulting tree.
 Prefix the file names and the table name with
 .Ar prefix .
 .El
-.Pp
-The following functions are generated by
-.Fl f
-or
-.Fl F :
-.Pp
-.Ft static inline int
-.Fn isok_EnumName "enum EnumName" ;
-.Pp
-.Ft static inline const char *
-.Fn tostr_EnumName "enum EnumName" ;
-.Pp
-.Ft static inline int
-.Fn fromstr_EnumName "const char *" "enum EnumName *" ;
-.Pp
-The
-.Fa EnumName
-is replaced with the enumeration name.
-.Fn isok_EnumName
-returns 1 if the argument is one of the valid enum values and 0 otherwise.
-.Fn tostr_EnumName
-returns a string representation of the enumeration value.
-If the values is not one of the legal values
-.Ar EnumName???
-is returned.
-.Fn fromstr_EnumName
-returns 1 if the string represents one of the legal enumeration values and
-0 otherwise.
-If 1 is return the variable pointed to by the second argument is set to
-the enumeration value.
 .Sh MIBS
 The syntax of the MIB description file can formally be specified as follows:
 .Bd -unfilled -offset indent

Modified: head/contrib/bsnmp/gensnmptree/gensnmptree.c
==
--- head/contrib/bsnmp/gensnmptree/gensnmptree.cTue Apr  2 12:02:35 
2019(r345796)
+++ head/contrib/bsnmp/gensnmptree/gensnmptree.cTue Apr  2 12:50:01 
2019(r345797)
@@ -110,7 +110,6 @@ static int debug;
 
 static const char usgtxt[] = "\
 Generate SNMP tables.\n\
-$Id$\n\
 usage: gensnmptree [-dEeFfhlt] [-I directory] [-i infile] [-p prefix]\n\
[name]...\n\
 options:\n\
@@ -127,6 +126,37 @@ options:\n\
   -t   generate a .def file\n\
 ";
 
+/**
+ * Program operation.
+ */
+enum op {
+   /** generate the tree */
+   OP_GEN,
+
+   /** extract OIDs */
+   OP_EXTRACT,
+
+   /** print the parsed tree */
+   OP_TREE,
+
+   /** extract