svn commit: r359514 - head/tools/test/bsnmp
Author: harti Date: Wed Apr 1 15:39:02 2020 New Revision: 359514 URL: https://svnweb.freebsd.org/changeset/base/359514 Log: Add a makefile to build and run the tests for the bsnmp library. This is not automatically built or run but must explicitly be built with 'make' and run with 'make run'. Added: head/tools/test/bsnmp/ head/tools/test/bsnmp/Makefile (contents, props changed) Added: head/tools/test/bsnmp/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/test/bsnmp/Makefile Wed Apr 1 15:39:02 2020 (r359514) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +CONTRIB=${SRCTOP}/contrib/bsnmp +.PATH: ${CONTRIB}/tests + +PROG_CXX=ctest +SRCS= main.cc asn1.cc snmp_parse_server.cc +CFLAGS += -I/${CONTRIB}/lib +CXXFLAGS+= -std=c++2a +LIBADD= bsnmp + +CFLAGS += -DBOGUS_CVE_2019_5610_FIX +MK_MAN= no + +.include + + +run: + ${.OBJDIR}/ctest ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359512 - in head: contrib/bsnmp/lib contrib/bsnmp/snmp_mibII contrib/bsnmp/snmp_usm contrib/bsnmp/snmp_vacm contrib/bsnmp/snmpd contrib/bsnmp/tests lib/libbsnmp/libbsnmp
, the port number and the community strings with +reasonable default values when they are not specified. +The default transport +is +.Dv SNMP_TRANS_UDP . +If the host name contains a slash the default is modified to +.Dv SNMP_TRANS_LOC_DGRAM . +If the host name looks like a numeric IPv6 address the default is +.Dv SNMP_TRANS_UDP6 . +For numeric IPv6 addresses the transport name udp is automatically +translated as +.Dv SNMP_TRANS_UDP6 . +The default port number (for +.Dv udp +or +.Dv udp6 ) +is +.Qq snmp . +The default read community is +.Qq public +and the default write community +.Qq private . +.Pp +.Fn snmp_parse_server +recognizes path names, host names and numerical IPv4 and IPv6 addresses. +A string consisting of digits and periods is assumed to be an IPv4 address +and must be parseable by +.Fn inet_aton 3 . +An IPv6 address is any string enclosed in square brackets. +It must be parseable with +.Fn gethostinfo 3 . +.Pp +The port number for +.Fn snmp_parse_server +can be specified numerically or symbolically. +It is ignored for local sockets. .Sh DIAGNOSTICS -If an error occurs in any of the function an error indication as described +If an error occurs in any of the functions an error indication as described above is returned. -Additionally the function sets a printable error string -in the +Additionally the function sets a printable error string in the .Va error -filed of +field of .Va snmp_client . .Sh SEE ALSO .Xr gensnmptree 1 , Modified: head/contrib/bsnmp/lib/snmpclient.c == --- head/contrib/bsnmp/lib/snmpclient.c Wed Apr 1 15:12:51 2020 (r359511) +++ head/contrib/bsnmp/lib/snmpclient.c Wed Apr 1 15:25:16 2020 (r359512) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2005,2018 + * Copyright (c) 2004-2005,2018-2019 * Hartmut Brandt. * All rights reserved. * Copyright (c) 2001-2003 @@ -930,7 +930,7 @@ open_client_udp(const char *host, const char *port) /* open connection */ memset(, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; - hints.ai_family = snmp_client.trans == SNMP_TRANS_UDP ? AF_INET: + hints.ai_family = snmp_client.trans == SNMP_TRANS_UDP ? AF_INET : AF_INET6; hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = 0; @@ -1884,7 +1884,8 @@ static const char *const trans_list[] = { /** * Try to get a transport identifier which is a leading alphanumeric string * terminated by a double colon. The string may not be empty. The transport - * identifier is optional. + * identifier is optional. Unknown transport identifiers are reject. + * Be careful: a double colon can also occur in a numeric IPv6 address. * * \param sc client struct to set errors * \param strp possible start of transport; updated to point to @@ -1899,8 +1900,6 @@ get_transp(struct snmp_client *sc, const char **strp) size_t i; for (i = 0; i < nitems(trans_list); i++) { - if (trans_list[i] == NULL || *trans_list[i] == '\0') - continue; p = strstr(*strp, trans_list[i]); if (p == *strp) { *strp += strlen(trans_list[i]); @@ -1908,13 +1907,23 @@ get_transp(struct snmp_client *sc, const char **strp) } } - p = *strp; - if (p[0] == ':' && p[1] == ':') { + p = strstr(*strp, "::"); + if (p == *strp) { seterr(sc, "empty transport specifier"); return (-1); } - /* by default assume UDP */ - return (SNMP_TRANS_UDP); + if (p == NULL) + /* by default assume UDP */ + return (SNMP_TRANS_UDP); + + /* ignore :: after [ */ + const char *ob = strchr(*strp, '['); + if (ob != NULL && p > ob) + /* by default assume UDP */ + return (SNMP_TRANS_UDP); + + seterr(sc, "unknown transport specifier '%.*s'", p - *strp, *strp); + return (-1); } /** @@ -2153,12 +2162,14 @@ int snmp_parse_server(struct snmp_client *sc, const char *str) { const char *const orig = str; + /* parse input */ - int i, trans = get_transp(sc, ); + int def_trans = 0, trans = get_transp(sc, ); if (trans < 0) return (-1); /* choose automatically */ - i = orig == str ? -1: trans; + if (orig == str) + def_trans = 1; const char *const comm[2] = { str, @@ -2204,7 +2215,7 @@ snmp_parse_server(struct snmp_client *sc, const char * } #if DEBUG_PARSE - printf("transp: %u\n", trans); + printf("transp: %d (def=%d)\n", trans, def_trans); printf("comm: %zu %zu\n", comm[0] - orig, comm[1] - orig); printf("ipv6: %zu %zu\n", ipv6[0] - orig, ipv6[1] - orig); printf(&q
svn commit: r359490 - in vendor/bsnmp/dist: . config gensnmpdef gensnmptree lib snmp_mibII snmp_ntp snmp_target snmp_usm snmp_vacm snmpd tests
Author: harti Date: Tue Mar 31 17:50:32 2020 New Revision: 359490 URL: https://svnweb.freebsd.org/changeset/base/359490 Log: Import version 1.14 of bsnmp. This mainly consists of bug fixes in the ASN.1 functions and comes with a test suite for these functions. Added: vendor/bsnmp/dist/snmpd/trans_inet.c (contents, props changed) vendor/bsnmp/dist/snmpd/trans_inet.h (contents, props changed) vendor/bsnmp/dist/tests/ vendor/bsnmp/dist/tests/asn1.cc (contents, props changed) vendor/bsnmp/dist/tests/catch.hpp (contents, props changed) vendor/bsnmp/dist/tests/constbuf.h (contents, props changed) vendor/bsnmp/dist/tests/main.cc (contents, props changed) vendor/bsnmp/dist/tests/snmp_parse_server.cc (contents, props changed) Deleted: vendor/bsnmp/dist/Makefile.in vendor/bsnmp/dist/README.1st vendor/bsnmp/dist/config/ vendor/bsnmp/dist/configure.ac vendor/bsnmp/dist/gensnmpdef/Makefile.in vendor/bsnmp/dist/gensnmptree/Makefile.in vendor/bsnmp/dist/lib/Makefile.in vendor/bsnmp/dist/lib/snmptc.h.in vendor/bsnmp/dist/libbsnmp.pc.in vendor/bsnmp/dist/snmp_mibII/Makefile.in vendor/bsnmp/dist/snmp_ntp/Makefile.in vendor/bsnmp/dist/snmp_target/Makefile.in vendor/bsnmp/dist/snmp_usm/Makefile.in vendor/bsnmp/dist/snmp_vacm/Makefile.in vendor/bsnmp/dist/snmpd/Makefile.in Modified: vendor/bsnmp/dist/gensnmptree/gensnmptree.1 vendor/bsnmp/dist/gensnmptree/gensnmptree.c vendor/bsnmp/dist/lib/asn1.c vendor/bsnmp/dist/lib/bsnmpclient.3 vendor/bsnmp/dist/lib/snmp.h vendor/bsnmp/dist/lib/snmpclient.c vendor/bsnmp/dist/lib/snmpclient.h vendor/bsnmp/dist/lib/snmpcrypto.c vendor/bsnmp/dist/lib/tc.def vendor/bsnmp/dist/snmp_mibII/mibII.c vendor/bsnmp/dist/snmp_mibII/mibII.h vendor/bsnmp/dist/snmp_mibII/mibII_interfaces.c vendor/bsnmp/dist/snmp_mibII/snmp_mibII.h vendor/bsnmp/dist/snmp_ntp/snmp_ntp.c vendor/bsnmp/dist/snmp_target/target_snmp.c vendor/bsnmp/dist/snmp_usm/usm_snmp.c vendor/bsnmp/dist/snmp_vacm/vacm_snmp.c vendor/bsnmp/dist/snmpd/BEGEMOT-SNMPD.txt vendor/bsnmp/dist/snmpd/main.c vendor/bsnmp/dist/snmpd/snmpd.config vendor/bsnmp/dist/snmpd/snmpd.h vendor/bsnmp/dist/snmpd/snmpmod.h vendor/bsnmp/dist/snmpd/trans_lsock.c vendor/bsnmp/dist/snmpd/trans_udp.c vendor/bsnmp/dist/snmpd/trap.c vendor/bsnmp/dist/snmpd/tree.def Modified: vendor/bsnmp/dist/gensnmptree/gensnmptree.1 == --- vendor/bsnmp/dist/gensnmptree/gensnmptree.1 Tue Mar 31 16:47:15 2020 (r359489) +++ vendor/bsnmp/dist/gensnmptree/gensnmptree.1 Tue Mar 31 17:50:32 2020 (r359490) @@ -2,7 +2,7 @@ .\" Copyright (c) 2001-2005 .\"Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\"All rights reserved. -.\" Copyright (c) 2006 +.\" Copyright (c) 2006,2018 .\"Hartmut Brandt .\"All rights reserved. .\" @@ -31,7 +31,7 @@ .\" .\" $Begemot: gensnmptree.1 383 2006-05-30 07:40:49Z brandt_h $ .\" -.Dd May 26, 2006 +.Dd April 2, 2019 .Dt GENSNMPTREE 1 .Os .Sh NAME @@ -39,7 +39,7 @@ .Nd "generate C and header files from a MIB description file" .Sh SYNOPSIS .Nm -.Op Fl dEehlt +.Op Fl dEeFfhlt .Op Fl I Ar directory .Op Fl i Ar infile .Op Fl p Ar prefix @@ -99,6 +99,12 @@ is the length of the OID. .It Va OID_ Ns Ar name is the last component of the OID. .El +.It Fl F +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 +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 Modified: vendor/bsnmp/dist/gensnmptree/gensnmptree.c == --- vendor/bsnmp/dist/gensnmptree/gensnmptree.c Tue Mar 31 16:47:15 2020 (r359489) +++ vendor/bsnmp/dist/gensnmptree/gensnmptree.c Tue Mar 31 17:50:32 2020 (r359490) @@ -123,9 +123,40 @@ options:\n\ -i ifile read from the named file instead of stdin\n\ -l generate local include directives\n\ -p prefixprepend prefix to file and variable names\n\ - -t generated a .def file\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 enums */ + OP_ENUMS, +}; + +/** + * Which functions to create. + */ +enum gen_funcs { + /** none */ + GEN_FUNCS_NONE, + + /** functions for header files */ + GEN_FUNCS_H, + + /** functions for C files */ + GEN_FUNCS_C, +}; + /* * A node in the OID tree */ @@ -161,15 +192,18 @@
svn commit: r359492 - in vendor: 1.14 bsnmp/1.14
Author: harti Date: Tue Mar 31 17:57:11 2020 New Revision: 359492 URL: https://svnweb.freebsd.org/changeset/base/359492 Log: Move the bsnmp 1.14 import tag to the correct place. Added: vendor/bsnmp/1.14/ - copied from r359491, vendor/1.14/ Deleted: vendor/1.14/ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359491 - vendor/1.14
Author: harti Date: Tue Mar 31 17:53:23 2020 New Revision: 359491 URL: https://svnweb.freebsd.org/changeset/base/359491 Log: Tag import of version 1.14 of bsnmp. Added: vendor/1.14/ - copied from r359490, vendor/bsnmp/dist/ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336778 - vendor/bsnmp/1.13
Author: harti Date: Fri Jul 27 19:31:58 2018 New Revision: 336778 URL: https://svnweb.freebsd.org/changeset/base/336778 Log: Tag bsnmp vendor release 1.13. Added: vendor/bsnmp/1.13/ - copied from r336777, vendor/bsnmp/dist/ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r336777 - in vendor/bsnmp/dist: . config gensnmpdef gensnmptree lib snmp_mibII snmp_ntp snmp_target snmp_usm snmp_vacm snmpd
Author: harti Date: Fri Jul 27 19:30:18 2018 New Revision: 336777 URL: https://svnweb.freebsd.org/changeset/base/336777 Log: Vendor import of bsnmp-1.13. Added: vendor/bsnmp/dist/README.1st (contents, props changed) vendor/bsnmp/dist/config/install-sh (contents, props changed) vendor/bsnmp/dist/lib/snmpcrypto.c (contents, props changed) vendor/bsnmp/dist/lib/snmptc.h.in (contents, props changed) vendor/bsnmp/dist/lib/tc.def (contents, props changed) vendor/bsnmp/dist/libbsnmp.pc.in (contents, props changed) vendor/bsnmp/dist/snmp_mibII/Makefile.in (contents, props changed) vendor/bsnmp/dist/snmp_target/ vendor/bsnmp/dist/snmp_target/Makefile.in (contents, props changed) vendor/bsnmp/dist/snmp_target/snmp_target.3 (contents, props changed) vendor/bsnmp/dist/snmp_target/target_snmp.c (contents, props changed) vendor/bsnmp/dist/snmp_target/target_tree.def (contents, props changed) vendor/bsnmp/dist/snmp_usm/ vendor/bsnmp/dist/snmp_usm/Makefile.in (contents, props changed) vendor/bsnmp/dist/snmp_usm/snmp_usm.3 (contents, props changed) vendor/bsnmp/dist/snmp_usm/usm_snmp.c (contents, props changed) vendor/bsnmp/dist/snmp_usm/usm_tree.def (contents, props changed) vendor/bsnmp/dist/snmp_vacm/ vendor/bsnmp/dist/snmp_vacm/Makefile.in (contents, props changed) vendor/bsnmp/dist/snmp_vacm/snmp_vacm.3 (contents, props changed) vendor/bsnmp/dist/snmp_vacm/vacm_snmp.c (contents, props changed) vendor/bsnmp/dist/snmp_vacm/vacm_tree.def (contents, props changed) Deleted: vendor/bsnmp/dist/acinclude.m4 vendor/bsnmp/dist/aclocal.m4 vendor/bsnmp/dist/config/install.sh vendor/bsnmp/dist/configure vendor/bsnmp/dist/snmpd/.gdbinit Modified: vendor/bsnmp/dist/Makefile.in (contents, props changed) vendor/bsnmp/dist/VERSION (contents, props changed) vendor/bsnmp/dist/config/Makefile.build (contents, props changed) vendor/bsnmp/dist/config/Makefile.post (contents, props changed) vendor/bsnmp/dist/config/Makefile.pre (contents, props changed) vendor/bsnmp/dist/config/config.guess (contents, props changed) vendor/bsnmp/dist/config/config.sub (contents, props changed) vendor/bsnmp/dist/config/ltmain.sh (contents, props changed) vendor/bsnmp/dist/config/mkinstalldirs (contents, props changed) vendor/bsnmp/dist/configure.ac (contents, props changed) vendor/bsnmp/dist/gensnmpdef/Makefile.in (contents, props changed) vendor/bsnmp/dist/gensnmpdef/gensnmpdef.1 (contents, props changed) vendor/bsnmp/dist/gensnmpdef/gensnmpdef.c (contents, props changed) vendor/bsnmp/dist/gensnmptree/Makefile.in (contents, props changed) vendor/bsnmp/dist/gensnmptree/gensnmptree.1 (contents, props changed) vendor/bsnmp/dist/gensnmptree/gensnmptree.c (contents, props changed) vendor/bsnmp/dist/lib/Makefile.in (contents, props changed) vendor/bsnmp/dist/lib/asn1.3 (contents, props changed) vendor/bsnmp/dist/lib/asn1.c (contents, props changed) vendor/bsnmp/dist/lib/asn1.h (contents, props changed) vendor/bsnmp/dist/lib/bsnmpagent.3 (contents, props changed) vendor/bsnmp/dist/lib/bsnmpclient.3 (contents, props changed) vendor/bsnmp/dist/lib/bsnmplib.3 (contents, props changed) vendor/bsnmp/dist/lib/snmp.c (contents, props changed) vendor/bsnmp/dist/lib/snmp.h (contents, props changed) vendor/bsnmp/dist/lib/snmpagent.c (contents, props changed) vendor/bsnmp/dist/lib/snmpagent.h (contents, props changed) vendor/bsnmp/dist/lib/snmpclient.c (contents, props changed) vendor/bsnmp/dist/lib/snmpclient.h (contents, props changed) vendor/bsnmp/dist/lib/snmppriv.h (contents, props changed) vendor/bsnmp/dist/lib/support.c (contents, props changed) vendor/bsnmp/dist/lib/support.h (contents, props changed) vendor/bsnmp/dist/oid-list (contents, props changed) vendor/bsnmp/dist/snmp_mibII/BEGEMOT-IP-MIB.txt (contents, props changed) vendor/bsnmp/dist/snmp_mibII/BEGEMOT-MIB2-MIB.txt (contents, props changed) vendor/bsnmp/dist/snmp_mibII/mibII.c (contents, props changed) vendor/bsnmp/dist/snmp_mibII/mibII.h (contents, props changed) vendor/bsnmp/dist/snmp_mibII/mibII_begemot.c (contents, props changed) vendor/bsnmp/dist/snmp_mibII/mibII_ifmib.c (contents, props changed) vendor/bsnmp/dist/snmp_mibII/mibII_ifstack.c (contents, props changed) vendor/bsnmp/dist/snmp_mibII/mibII_interfaces.c (contents, props changed) vendor/bsnmp/dist/snmp_mibII/mibII_ip.c (contents, props changed) vendor/bsnmp/dist/snmp_mibII/mibII_ipaddr.c (contents, props changed) vendor/bsnmp/dist/snmp_mibII/mibII_nettomedia.c (contents, props changed) vendor/bsnmp/dist/snmp_mibII/mibII_rcvaddr.c (contents, props changed) vendor/bsnmp/dist/snmp_mibII/mibII_route.c (contents, props changed) vendor/bsnmp/dist/snmp_mibII/mibII_tcp.c (contents, props changed) vendor/bsnmp/dist/snmp_mibII/mibII_tree.def (contents, props changed)
svn commit: r335885 - in head: contrib/bsnmp contrib/bsnmp/gensnmptree contrib/bsnmp/lib contrib/bsnmp/snmp_mibII contrib/bsnmp/snmp_ntp contrib/bsnmp/snmp_target contrib/bsnmp/snmp_usm contrib/bsn...
Author: harti Date: Tue Jul 3 08:44:40 2018 New Revision: 335885 URL: https://svnweb.freebsd.org/changeset/base/335885 Log: Update bsnmp to version 1.13. This does not bring user-visible changes. For developers gensnmptree can now generate functions for enums to convert between enums and strings and to check the validity of a value. The sources in FreeBSD are now in sync with the upstream which allows to bring in IPv6 modifications. Modified: head/contrib/bsnmp/VERSION head/contrib/bsnmp/gensnmptree/gensnmptree.1 head/contrib/bsnmp/gensnmptree/gensnmptree.c head/contrib/bsnmp/lib/snmp.h head/contrib/bsnmp/lib/tc.def head/contrib/bsnmp/snmp_mibII/mibII.c head/contrib/bsnmp/snmp_mibII/mibII_route.c head/contrib/bsnmp/snmp_ntp/snmp_ntp.c head/contrib/bsnmp/snmp_target/target_snmp.c head/contrib/bsnmp/snmp_target/target_tree.def head/contrib/bsnmp/snmp_usm/usm_snmp.c head/contrib/bsnmp/snmp_usm/usm_tree.def head/contrib/bsnmp/snmp_vacm/vacm_snmp.c head/contrib/bsnmp/snmp_vacm/vacm_tree.def head/contrib/bsnmp/snmpd/main.c head/contrib/bsnmp/snmpd/trans_udp.c head/contrib/bsnmp/snmpd/trap.c head/contrib/bsnmp/snmpd/tree.def head/contrib/libbegemot/rpoll.c head/contrib/libbegemot/rpoll.h head/lib/libbsnmp/libbsnmp/Makefile head/share/mk/bsd.snmpmod.mk head/usr.sbin/bsnmpd/bsnmpd/Makefile head/usr.sbin/bsnmpd/modules/snmp_bridge/Makefile head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_addrs.c head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_pf.c head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.c head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c head/usr.sbin/bsnmpd/modules/snmp_hast/Makefile head/usr.sbin/bsnmpd/modules/snmp_pf/Makefile head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c head/usr.sbin/bsnmpd/modules/snmp_target/Makefile head/usr.sbin/bsnmpd/modules/snmp_usm/Makefile head/usr.sbin/bsnmpd/modules/snmp_vacm/Makefile head/usr.sbin/bsnmpd/modules/snmp_wlan/Makefile head/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.c head/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_sys.c Modified: head/contrib/bsnmp/VERSION == --- head/contrib/bsnmp/VERSION Tue Jul 3 05:56:23 2018(r335884) +++ head/contrib/bsnmp/VERSION Tue Jul 3 08:44:40 2018(r335885) @@ -1 +1 @@ -1.12 +1.13 Modified: head/contrib/bsnmp/gensnmptree/gensnmptree.1 == --- head/contrib/bsnmp/gensnmptree/gensnmptree.1Tue Jul 3 05:56:23 2018(r335884) +++ head/contrib/bsnmp/gensnmptree/gensnmptree.1Tue Jul 3 08:44:40 2018(r335885) @@ -2,7 +2,7 @@ .\" Copyright (c) 2001-2005 .\"Fraunhofer Institute for Open Communication Systems (FhG Fokus). .\"All rights reserved. -.\" Copyright (c) 2006 +.\" Copyright (c) 2006,2018 .\"Hartmut Brandt .\"All rights reserved. .\" @@ -31,7 +31,7 @@ .\" .\" $Begemot: gensnmptree.1 383 2006-05-30 07:40:49Z brandt_h $ .\" -.Dd May 26, 2006 +.Dd June 29, 2018 .Dt GENSNMPTREE 1 .Os .Sh NAME @@ -39,7 +39,7 @@ .Nd "generate C and header files from a MIB description file" .Sh SYNOPSIS .Nm -.Op Fl dEehlt +.Op Fl dEeFfhlt .Op Fl I Ar directory .Op Fl i Ar infile .Op Fl p Ar prefix @@ -99,6 +99,26 @@ is the length of the OID. .It Va OID_ Ns Ar name 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. +.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. .It Fl h Print a short help page. .It Fl I Ar directory @@ -116,6 +136,36 @@ 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
svn commit: r313043 - head/sys/kern
Author: harti Date: Wed Feb 1 13:12:07 2017 New Revision: 313043 URL: https://svnweb.freebsd.org/changeset/base/313043 Log: Merge filt_soread and filt_solisten and decide what to do when checking for EVFILT_READ at the point of the check not when the event is registers. This fixes a problem with asio when accepting a connection. Reviewed by: kib@, Scott Mitchell Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c == --- head/sys/kern/uipc_socket.c Wed Feb 1 08:46:59 2017(r313042) +++ head/sys/kern/uipc_socket.c Wed Feb 1 13:12:07 2017(r313043) @@ -159,16 +159,10 @@ static void filt_sordetach(struct knote static int filt_soread(struct knote *kn, long hint); static voidfilt_sowdetach(struct knote *kn); static int filt_sowrite(struct knote *kn, long hint); -static int filt_solisten(struct knote *kn, long hint); static int inline hhook_run_socket(struct socket *so, void *hctx, int32_t h_id); static int filt_soempty(struct knote *kn, long hint); fo_kqfilter_t soo_kqfilter; -static struct filterops solisten_filtops = { - .f_isfd = 1, - .f_detach = filt_sordetach, - .f_event = filt_solisten, -}; static struct filterops soread_filtops = { .f_isfd = 1, .f_detach = filt_sordetach, @@ -3107,10 +3101,7 @@ soo_kqfilter(struct file *fp, struct kno switch (kn->kn_filter) { case EVFILT_READ: - if (so->so_options & SO_ACCEPTCONN) - kn->kn_fop = _filtops; - else - kn->kn_fop = _filtops; + kn->kn_fop = _filtops; sb = >so_rcv; break; case EVFILT_WRITE: @@ -3321,6 +3312,11 @@ filt_soread(struct knote *kn, long hint) struct socket *so; so = kn->kn_fp->f_data; + if (so->so_options & SO_ACCEPTCONN) { + kn->kn_data = so->so_qlen; + return (!TAILQ_EMPTY(>so_comp)); + + } SOCKBUF_LOCK_ASSERT(>so_rcv); kn->kn_data = sbavail(>so_rcv) - so->so_rcv.sb_ctl; @@ -,11 +3329,9 @@ filt_soread(struct knote *kn, long hint) if (kn->kn_sfflags & NOTE_LOWAT) { if (kn->kn_data >= kn->kn_sdata) - return 1; - } else { - if (sbavail(>so_rcv) >= so->so_rcv.sb_lowat) - return 1; - } + return (1); + } else if (sbavail(>so_rcv) >= so->so_rcv.sb_lowat) + return (1); /* This hook returning non-zero indicates an event, not error */ return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); @@ -3397,16 +3391,6 @@ filt_soempty(struct knote *kn, long hint return (0); } -/*ARGSUSED*/ -static int -filt_solisten(struct knote *kn, long hint) -{ - struct socket *so = kn->kn_fp->f_data; - - kn->kn_data = so->so_qlen; - return (!TAILQ_EMPTY(>so_comp)); -} - int socheckuid(struct socket *so, uid_t uid) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r294507 - head/contrib/bsnmp/snmp_mibII
Author: harti Date: Thu Jan 21 16:11:20 2016 New Revision: 294507 URL: https://svnweb.freebsd.org/changeset/base/294507 Log: Fill the ifAlias leaf of the ifXTable with the interface description if there is one available and it fits into the maximum size (64 characters). Modified: head/contrib/bsnmp/snmp_mibII/mibII.c head/contrib/bsnmp/snmp_mibII/mibII.h head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c Modified: head/contrib/bsnmp/snmp_mibII/mibII.c == --- head/contrib/bsnmp/snmp_mibII/mibII.c Thu Jan 21 15:27:44 2016 (r294506) +++ head/contrib/bsnmp/snmp_mibII/mibII.c Thu Jan 21 16:11:20 2016 (r294507) @@ -443,6 +443,7 @@ mib_fetch_ifmib(struct mibif *ifp) size_t len; void *newmib; struct ifmibdata oldmib = ifp->mib; + struct ifreq irr; if (fetch_generic_mib(ifp, ) == -1) return (-1); @@ -514,6 +515,18 @@ mib_fetch_ifmib(struct mibif *ifp) } out: + strncpy(irr.ifr_name, ifp->name, sizeof(irr.ifr_name)); + irr.ifr_buffer.buffer = MIBIF_PRIV(ifp)->alias; + irr.ifr_buffer.length = sizeof(MIBIF_PRIV(ifp)->alias); + if (ioctl(mib_netsock, SIOCGIFDESCR, ) == -1) { + MIBIF_PRIV(ifp)->alias[0] = 0; + if (errno != ENOMSG) + syslog(LOG_WARNING, "SIOCGIFDESCR (%s): %m", ifp->name); + } else if (irr.ifr_buffer.buffer == NULL) { + MIBIF_PRIV(ifp)->alias[0] = 0; + syslog(LOG_WARNING, "SIOCGIFDESCR (%s): too long (%zu)", + ifp->name, irr.ifr_buffer.length); + } ifp->mibtick = get_ticks(); return (0); } Modified: head/contrib/bsnmp/snmp_mibII/mibII.h == --- head/contrib/bsnmp/snmp_mibII/mibII.h Thu Jan 21 15:27:44 2016 (r294506) +++ head/contrib/bsnmp/snmp_mibII/mibII.h Thu Jan 21 16:11:20 2016 (r294507) @@ -57,6 +57,9 @@ #include "snmp_mibII.h" #include "mibII_tree.h" +/* maximum size of the interface alias */ +static const u_int MIBIF_ALIAS_SIZE = 64 + 1; + /* * Interface list and flags. */ @@ -77,6 +80,9 @@ struct mibif_private { uint64_thc_opackets; uint64_thc_imcasts; uint64_thc_ipackets; + + /* this should be made public */ + charalias[MIBIF_ALIAS_SIZE]; }; #defineMIBIF_PRIV(IFP) ((struct mibif_private *)((IFP)->private)) Modified: head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c == --- head/contrib/bsnmp/snmp_mibII/mibII_interfaces.cThu Jan 21 15:27:44 2016(r294506) +++ head/contrib/bsnmp/snmp_mibII/mibII_interfaces.cThu Jan 21 16:11:20 2016(r294507) @@ -528,7 +528,7 @@ op_ifxtable(struct snmp_context *ctx, st break; case LEAF_ifAlias: - ret = string_get(value, "", -1); + ret = string_get(value, MIBIF_PRIV(ifp)->alias, -1); break; case LEAF_ifCounterDiscontinuityTime: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r260986 - head/contrib/bsnmp/lib
Author: harti Date: Tue Jan 21 16:49:54 2014 New Revision: 260986 URL: http://svnweb.freebsd.org/changeset/base/260986 Log: Fix a problem with OBJECT IDENTIFIER encoding: need to check the second subid to be less than 40, not the first when the first subid is 0 or 1. Modified: head/contrib/bsnmp/lib/asn1.c Modified: head/contrib/bsnmp/lib/asn1.c == --- head/contrib/bsnmp/lib/asn1.c Tue Jan 21 16:02:31 2014 (r260985) +++ head/contrib/bsnmp/lib/asn1.c Tue Jan 21 16:49:54 2014 (r260986) @@ -652,7 +652,7 @@ asn_put_objid(struct asn_buf *b, const s err = ASN_ERR_RANGE; } if (oid-subs[0] 2 || - (oid-subs[0] 2 oid-subs[0] = 40)) { + (oid-subs[0] 2 oid-subs[1] = 40)) { asn_error(NULL, oid out of range (%u,%u), oid-subs[0], oid-subs[1]); err = ASN_ERR_RANGE; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r235777 - head/sys/kern
Author: harti Date: Tue May 22 07:23:41 2012 New Revision: 235777 URL: http://svn.freebsd.org/changeset/base/235777 Log: Make dumptid non-static. It is used by libkvm to detect whether this is a VNET-kernel or not. gcc used to put the static symbol into the symbol table, clang does not. This fixes the 'netstat: no namelist' error seen on clang+VNET systems. Modified: head/sys/kern/kern_shutdown.c Modified: head/sys/kern/kern_shutdown.c == --- head/sys/kern/kern_shutdown.c Tue May 22 07:04:23 2012 (r235776) +++ head/sys/kern/kern_shutdown.c Tue May 22 07:23:41 2012 (r235777) @@ -151,7 +151,7 @@ static struct dumperinfo dumper;/* our /* Context information for dump-debuggers. */ static struct pcb dumppcb; /* Registers. */ -static lwpid_t dumptid;/* Thread ID. */ +lwpid_t dumptid; /* Thread ID. */ static void poweroff_wait(void *, int); static void shutdown_halt(void *junk, int howto); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r235780 - head/include
Author: harti Date: Tue May 22 09:59:49 2012 New Revision: 235780 URL: http://svn.freebsd.org/changeset/base/235780 Log: Fix a compilation error with some compilers: __attribute__ requires two parenthesis for its argument, but instead of using __attribute__ directly, use the appropriate __nonnull macro from cdefs.h. Modified: head/include/malloc_np.h Modified: head/include/malloc_np.h == --- head/include/malloc_np.hTue May 22 09:27:57 2012(r235779) +++ head/include/malloc_np.hTue May 22 09:59:49 2012(r235780) @@ -55,13 +55,11 @@ int mallctlbymib(const size_t *mib, size #defineALLOCM_ERR_OOM 1 #defineALLOCM_ERR_NOT_MOVED2 -intallocm(void **ptr, size_t *rsize, size_t size, int flags) -__attribute__(nonnull(1)); +intallocm(void **ptr, size_t *rsize, size_t size, int flags) __nonnull(1); intrallocm(void **ptr, size_t *rsize, size_t size, size_t extra, -int flags) __attribute__(nonnull(1)); -intsallocm(const void *ptr, size_t *rsize, int flags) -__attribute__(nonnull(1)); -intdallocm(void *ptr, int flags) __attribute__(nonnull(1)); +int flags) __nonnull(1); +intsallocm(const void *ptr, size_t *rsize, int flags) __nonnull(1); +intdallocm(void *ptr, int flags) __nonnull(1); intnallocm(size_t *rsize, size_t size, int flags); __END_DECLS ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r235777 - head/sys/kern
On Tue, 22 May 2012, Bruce Evans wrote: BEOn Tue, 22 May 2012, Hartmut Brandt wrote: BE BE Log: BE Make dumptid non-static. It is used by libkvm to detect whether BE this is a VNET-kernel or not. gcc used to put the static symbol into BE the symbol table, clang does not. This fixes the 'netstat: no namelist' BE error seen on clang+VNET systems. BE BE Modified: BE head/sys/kern/kern_shutdown.c BE BEThat would be a bug in clang if it were done for static symbols generally, BEbut here the bug seems to be that the symbol is not declared as __used. I don't get this. Why should a symbol declared static be in the symbol table (except for debugging purposes) ? It has internal linkage and so has a meaning only in the given file. What is the linker supposed to do with several static symbols with the same name from several object files? If several files declared static dumptids, which one would kldsym be supposed to return? harti BE BEgcc does the same for a file containing only static int x;, but it BEis apparently confused by dumptid being initialized non-statically, BEalthough the initialization has no side effects. If dumptid were a BElocal variable, then clang would probably warn about the variable being BEunused, but gcc-4.2.1 never detects such unused variables (thus code BEthat compiles with gcc -Wunused -Werror often fails with clang). Here BEthe initialization is to curthread-td_tid, so it isn't clear if the BEcompiler can tell if it has no side effects. curthread() is actually BE__curthread(). __curthread() is now declared as __pure2, but that BEnever worked for me with older compilers (its result wasn't cached). BEIf the compilers can tell that the expression has no side effects, BEthen it is another bug that they don't warn about it having no effect BEwhen it is only assigned to the apparently-unused variable dumptid. BE BE Modified: head/sys/kern/kern_shutdown.c BE == BE --- head/sys/kern/kern_shutdown.c Tue May 22 07:04:23 2012 BE (r235776) BE +++ head/sys/kern/kern_shutdown.c Tue May 22 07:23:41 2012 BE (r235777) BE @@ -151,7 +151,7 @@ static struct dumperinfo dumper; /* our BE BE /* Context information for dump-debuggers. */ BE static struct pcb dumppcb; /* Registers. */ BE -static lwpid_t dumptid; /* Thread ID. */ BE +lwpid_t dumptid; /* Thread ID. */ BE BE static void poweroff_wait(void *, int); BE static void shutdown_halt(void *junk, int howto); BE BENow there are 3 bugs instead of 1: BE- the variable is declared (implicit) extern instead of static BE- the extern declaration is in a section for static declaration BE- the variable is still not declared as __used. If the compiler did BE a more extensive usage analysis, that looked at all object files but BE not at the libkvm API, then it should remove this variable anyway BE when it is not declared as __used. BE BEBruce BE BE ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r233128 - head/contrib/bsnmp/snmpd
Author: harti Date: Sun Mar 18 19:28:52 2012 New Revision: 233128 URL: http://svn.freebsd.org/changeset/base/233128 Log: memset() wants the size of the structure to clear, not the size of the pointer to it. Submitted by: Pawel Worach Modified: head/contrib/bsnmp/snmpd/main.c Modified: head/contrib/bsnmp/snmpd/main.c == --- head/contrib/bsnmp/snmpd/main.c Sun Mar 18 19:15:11 2012 (r233127) +++ head/contrib/bsnmp/snmpd/main.c Sun Mar 18 19:28:52 2012 (r233128) @@ -2703,7 +2703,7 @@ bsnmpd_get_usm_stats(void) void bsnmpd_reset_usm_stats(void) { - memset(snmpd_usmstats, 0, sizeof(snmpd_usmstats)); + memset(snmpd_usmstats, 0, sizeof(snmpd_usmstats)); } struct usm_user * ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r218225 - head/contrib/bsnmp
Author: harti Date: Thu Feb 3 15:19:18 2011 New Revision: 218225 URL: http://svn.freebsd.org/changeset/base/218225 Log: Bring the list of OIDs up-to-date to prevent conflicts. Modified: head/contrib/bsnmp/oid-list Modified: head/contrib/bsnmp/oid-list == --- head/contrib/bsnmp/oid-list Thu Feb 3 15:13:15 2011(r218224) +++ head/contrib/bsnmp/oid-list Thu Feb 3 15:19:18 2011(r218225) @@ -1,4 +1,4 @@ -$Begemot: bsnmp/oid-list,v 1.5 2006/02/27 09:55:45 brandt_h Exp $ +$Begemot: bsnmp/trunk/oid-list 1512 2011-02-03 15:16:22Z brandt_h $ This file documents the OID assignments under BSNMP's private OID. @@ -12,12 +12,30 @@ enterprises 1BEGEMOT-SNMPD 2BEGEMOT-NETGRAPHsnmpd netgraph module 3BEGEMOT-IP snmpd IP related stuff. + 4BEGEMOT-IFACE-MIB interface MIB private stuff + 5BEGEMOT-IPSTATS-MIB IP statistics + 6BEGEMOT-IP-MIB IP objects 100 BEGEMOT-ILMID snmpd ILMID module 101 BEGEMOT-ATM snmpd ATM module 200 BEGEMOT-PF snmpd PF module (phil...@freebsd.org) 201 BEGEMOT-NTP snmpd NTP module 202 BEGEMOT-HOSTRES snmpd HOSTRES module private stuff + 203 regexData bsnmp-regex (Nate Nielsen niel...@memberwebs.com) + 204 pingDatabsnmp-ping (Nate Nielsen niel...@memberwebs.com) + 205 begemotBridge bridge module + 210 begemotWlan WLAN module + 300 BEGEMOT-ACM DLR ACM project + 303 BEGEMOT-WLINK DLR WLINK simulator + 304 BEGEMOT-SATXDLR SatX simulator + + 405 mysql (vani...@fatpipi.com) + 406 varnish (vani...@fatpipi.com) + + 500 DLR-MOSAKA DLR Mosaka simulation platform + + bsnmp-jails per-jail network, cpu, disk, memory statistics (Stef Walter s...@memberwebs.com) + 1112 bsnmp-pcap monitor traffic for specific network flows (Stef Walter s...@memberwebs.com) If you need an OID and don't know where to stuck it in, I can assign you one - just drop me a mail. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r202070 - head/usr.bin/make
Author: harti Date: Mon Jan 11 09:16:42 2010 New Revision: 202070 URL: http://svn.freebsd.org/changeset/base/202070 Log: Fix the previous commit (still not used to svn vs. cvs). Use the define from paths.h for the default temporary directory and remove and unneccessary getenv call. Modified: head/usr.bin/make/job.c Modified: head/usr.bin/make/job.c == --- head/usr.bin/make/job.c Mon Jan 11 05:26:18 2010(r202069) +++ head/usr.bin/make/job.c Mon Jan 11 09:16:42 2010(r202070) @@ -115,6 +115,7 @@ __FBSDID($FreeBSD$); #include fcntl.h #include inttypes.h #include limits.h +#include paths.h #include string.h #include signal.h #include stdlib.h @@ -139,7 +140,6 @@ __FBSDID($FreeBSD$); #include var.h #defineTMPPAT makeXX -#defineTMPDIR /tmp #ifndef USE_KQUEUE /* @@ -1611,7 +1611,7 @@ JobStart(GNode *gn, int flags, Job *prev } if ((tdir = getenv(TMPDIR)) == NULL) - tdir = TMPDIR; + tdir = _PATH_TMP; /* * If the -n flag wasn't given, we open up OUR (not the child's) @@ -1807,8 +1807,6 @@ JobStart(GNode *gn, int flags, Job *prev } else { fprintf(stdout, Remaking `%s'\n, gn-name); fflush(stdout); - if ((tdir = getenv(TMPDIR)) == NULL) - tdir = TMPDIR; snprintf(job-outFile, sizeof(job-outFile), %s/%s, tdir, TMPPAT); if ((job-outFd = mkstemp(job-outFile)) == -1) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r202045 - head/usr.bin/make
Author: harti Date: Sun Jan 10 20:26:03 2010 New Revision: 202045 URL: http://svn.freebsd.org/changeset/base/202045 Log: Make make respect the TMPDIR environment variable. PR: bin/115447 Submitted by: Eugene Grosbein Modified: head/usr.bin/make/job.c Modified: head/usr.bin/make/job.c == --- head/usr.bin/make/job.c Sun Jan 10 20:22:05 2010(r202044) +++ head/usr.bin/make/job.c Sun Jan 10 20:26:03 2010(r202045) @@ -114,6 +114,7 @@ __FBSDID($FreeBSD$); #include errno.h #include fcntl.h #include inttypes.h +#include limits.h #include string.h #include signal.h #include stdlib.h @@ -137,7 +138,8 @@ __FBSDID($FreeBSD$); #include util.h #include var.h -#defineTMPPAT /tmp/makeXX +#defineTMPPAT makeXX +#defineTMPDIR /tmp #ifndef USE_KQUEUE /* @@ -236,7 +238,7 @@ typedef struct Job { */ struct { /* Name of file to which shell output was rerouted */ - charof_outFile[sizeof(TMPPAT)]; + charof_outFile[PATH_MAX]; /* * Stream open to the output file. Used to funnel all @@ -1566,7 +1568,8 @@ JobStart(GNode *gn, int flags, Job *prev Boolean noExec; /* Set true if we decide not to run the job */ int tfd;/* File descriptor for temp file */ LstNode *ln; - chartfile[sizeof(TMPPAT)]; + chartfile[PATH_MAX]; + const char *tdir; if (interrupted) { JobPassSig(interrupted); @@ -1607,6 +1610,9 @@ JobStart(GNode *gn, int flags, Job *prev cmdsOK = TRUE; } + if ((tdir = getenv(TMPDIR)) == NULL) + tdir = TMPDIR; + /* * If the -n flag wasn't given, we open up OUR (not the child's) * temporary file to stuff commands in it. The thing is rd/wr so we @@ -1622,7 +1628,7 @@ JobStart(GNode *gn, int flags, Job *prev DieHorribly(); } - strcpy(tfile, TMPPAT); + snprintf(tfile, sizeof(tfile), %s/%s, tdir, TMPPAT); if ((tfd = mkstemp(tfile)) == -1) Punt(Cannot create temp file: %s, strerror(errno)); job-cmdFILE = fdopen(tfd, w+); @@ -1801,7 +1807,10 @@ JobStart(GNode *gn, int flags, Job *prev } else { fprintf(stdout, Remaking `%s'\n, gn-name); fflush(stdout); - strcpy(job-outFile, TMPPAT); + if ((tdir = getenv(TMPDIR)) == NULL) + tdir = TMPDIR; + snprintf(job-outFile, sizeof(job-outFile), %s/%s, + tdir, TMPPAT); if ((job-outFd = mkstemp(job-outFile)) == -1) Punt(cannot create temp file: %s, strerror(errno)); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r187132 - head/usr.bin/make
Erik Trulsson wrote: On Fri, Jan 30, 2009 at 01:02:15PM +0100, Ivan Voras wrote: 2009/1/30 David O'Brien obr...@freebsd.org: compiler invocation must really bug you. Perhaps we should have the quiet out put of the ncftp3 build where every complication takes only 1 line: Compiling DStrCat.so: [OK] Compiling DStrFree.so:[OK] Compiling Dynscpy.so: [OK] Compiling Strncpy.so: [OK] Compiling strtokc.so: [OK] ..snip.. I'd vote for that being the default :) I would not. In fact I am quite happy that is not the default. It's also the mode used by Linux kernel (note that it's not a pro or a contra argument in itself), e.g. True, and it is a PITA when there is a problem with the compilation, since you need to add extra flags to the verbose output so you can find out what flags the compiler actually was invoked with. I took that vote as a joke. It may only be a joke, right? harti ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r186357 - in vendor/bsnmp: 1.10 1.10/contrib 1.10/gensnmpdef 1.10/gensnmptree 1.10/lib 1.10/snmp_mibII 1.10/snmp_ntp 1.10/snmpd 1.11 1.11/config 1.11/contrib 1.11/gensnmpdef 1.11/gensnm...
Author: harti Date: Sat Dec 20 16:44:43 2008 New Revision: 186357 URL: http://svn.freebsd.org/changeset/base/186357 Log: Flatten bsnmp vendor area. Added: vendor/bsnmp/1.10/NEWS - copied unchanged from r186355, vendor/bsnmp/1.10/contrib/bsnmp/NEWS vendor/bsnmp/1.10/README - copied unchanged from r186355, vendor/bsnmp/1.10/contrib/bsnmp/README vendor/bsnmp/1.10/TODO - copied unchanged from r186355, vendor/bsnmp/1.10/contrib/bsnmp/TODO vendor/bsnmp/1.10/VERSION - copied unchanged from r186355, vendor/bsnmp/1.10/contrib/bsnmp/VERSION vendor/bsnmp/1.10/gensnmpdef/ - copied from r186355, vendor/bsnmp/1.10/contrib/bsnmp/gensnmpdef/ vendor/bsnmp/1.10/gensnmptree/ - copied from r186355, vendor/bsnmp/1.10/contrib/bsnmp/gensnmptree/ vendor/bsnmp/1.10/lib/ - copied from r186355, vendor/bsnmp/1.10/contrib/bsnmp/lib/ vendor/bsnmp/1.10/oid-list - copied unchanged from r186355, vendor/bsnmp/1.10/contrib/bsnmp/oid-list vendor/bsnmp/1.10/snmp_mibII/ - copied from r186355, vendor/bsnmp/1.10/contrib/bsnmp/snmp_mibII/ vendor/bsnmp/1.10/snmp_ntp/ - copied from r186355, vendor/bsnmp/1.10/contrib/bsnmp/snmp_ntp/ vendor/bsnmp/1.10/snmpd/ - copied from r186355, vendor/bsnmp/1.10/contrib/bsnmp/snmpd/ vendor/bsnmp/1.11/Makefile.in - copied unchanged from r186355, vendor/bsnmp/1.11/contrib/bsnmp/Makefile.in vendor/bsnmp/1.11/NEWS - copied unchanged from r186355, vendor/bsnmp/1.11/contrib/bsnmp/NEWS vendor/bsnmp/1.11/README - copied unchanged from r186355, vendor/bsnmp/1.11/contrib/bsnmp/README vendor/bsnmp/1.11/TODO - copied unchanged from r186355, vendor/bsnmp/1.11/contrib/bsnmp/TODO vendor/bsnmp/1.11/VERSION - copied unchanged from r186355, vendor/bsnmp/1.11/contrib/bsnmp/VERSION vendor/bsnmp/1.11/acinclude.m4 - copied unchanged from r186355, vendor/bsnmp/1.11/contrib/bsnmp/acinclude.m4 vendor/bsnmp/1.11/aclocal.m4 - copied unchanged from r186355, vendor/bsnmp/1.11/contrib/bsnmp/aclocal.m4 vendor/bsnmp/1.11/config/ - copied from r186355, vendor/bsnmp/1.11/contrib/bsnmp/config/ vendor/bsnmp/1.11/configure - copied unchanged from r186355, vendor/bsnmp/1.11/contrib/bsnmp/configure vendor/bsnmp/1.11/configure.ac - copied unchanged from r186355, vendor/bsnmp/1.11/contrib/bsnmp/configure.ac vendor/bsnmp/1.11/gensnmpdef/ - copied from r186355, vendor/bsnmp/1.11/contrib/bsnmp/gensnmpdef/ vendor/bsnmp/1.11/gensnmptree/ - copied from r186355, vendor/bsnmp/1.11/contrib/bsnmp/gensnmptree/ vendor/bsnmp/1.11/lib/ - copied from r186355, vendor/bsnmp/1.11/contrib/bsnmp/lib/ vendor/bsnmp/1.11/oid-list - copied unchanged from r186355, vendor/bsnmp/1.11/contrib/bsnmp/oid-list vendor/bsnmp/1.11/snmp_mibII/ - copied from r186355, vendor/bsnmp/1.11/contrib/bsnmp/snmp_mibII/ vendor/bsnmp/1.11/snmp_ntp/ - copied from r186355, vendor/bsnmp/1.11/contrib/bsnmp/snmp_ntp/ vendor/bsnmp/1.11/snmpd/ - copied from r186355, vendor/bsnmp/1.11/contrib/bsnmp/snmpd/ vendor/bsnmp/1.12/NEWS - copied unchanged from r186355, vendor/bsnmp/1.12/contrib/bsnmp/NEWS vendor/bsnmp/1.12/README - copied unchanged from r186355, vendor/bsnmp/1.12/contrib/bsnmp/README vendor/bsnmp/1.12/TODO - copied unchanged from r186355, vendor/bsnmp/1.12/contrib/bsnmp/TODO vendor/bsnmp/1.12/VERSION - copied unchanged from r186355, vendor/bsnmp/1.12/contrib/bsnmp/VERSION vendor/bsnmp/1.12/gensnmpdef/ - copied from r186355, vendor/bsnmp/1.12/contrib/bsnmp/gensnmpdef/ vendor/bsnmp/1.12/gensnmptree/ - copied from r186355, vendor/bsnmp/1.12/contrib/bsnmp/gensnmptree/ vendor/bsnmp/1.12/lib/ - copied from r186355, vendor/bsnmp/1.12/contrib/bsnmp/lib/ vendor/bsnmp/1.12/oid-list - copied unchanged from r186355, vendor/bsnmp/1.12/contrib/bsnmp/oid-list vendor/bsnmp/1.12/snmp_mibII/ - copied from r186355, vendor/bsnmp/1.12/contrib/bsnmp/snmp_mibII/ vendor/bsnmp/1.12/snmp_ntp/ - copied from r186355, vendor/bsnmp/1.12/contrib/bsnmp/snmp_ntp/ vendor/bsnmp/1.12/snmpd/ - copied from r186355, vendor/bsnmp/1.12/contrib/bsnmp/snmpd/ vendor/bsnmp/1.4/NEWS - copied unchanged from r186355, vendor/bsnmp/1.4/contrib/bsnmp/NEWS vendor/bsnmp/1.4/README - copied unchanged from r186355, vendor/bsnmp/1.4/contrib/bsnmp/README vendor/bsnmp/1.4/TODO - copied unchanged from r186355, vendor/bsnmp/1.4/contrib/bsnmp/TODO vendor/bsnmp/1.4/VERSION - copied unchanged from r186355, vendor/bsnmp/1.4/contrib/bsnmp/VERSION vendor/bsnmp/1.4/gensnmptree/ - copied from r186355, vendor/bsnmp/1.4/contrib/bsnmp/gensnmptree/ vendor/bsnmp/1.4/lib/ - copied from r186355, vendor/bsnmp/1.4/contrib/bsnmp/lib/ vendor/bsnmp/1.4/snmp_mibII/ - copied from r186355, vendor/bsnmp/1.4/contrib/bsnmp/snmp_mibII/ vendor/bsnmp/1.4/snmpd/ - copied from r186355, vendor/bsnmp/1.4/contrib/bsnmp/snmpd/ vendor/bsnmp/1.5a/FREEBSD-upgrade
svn commit: r186358 - in vendor/bsnmp/dist: . config gensnmpdef gensnmptree lib snmp_mibII snmp_ntp snmpd
Author: harti Date: Sat Dec 20 17:15:56 2008 New Revision: 186358 URL: http://svn.freebsd.org/changeset/base/186358 Log: Remove the svn:keywords property. Modified: vendor/bsnmp/dist/Makefile.in (props changed) vendor/bsnmp/dist/NEWS (props changed) vendor/bsnmp/dist/README (props changed) vendor/bsnmp/dist/TODO (props changed) vendor/bsnmp/dist/VERSION (props changed) vendor/bsnmp/dist/acinclude.m4 (props changed) vendor/bsnmp/dist/aclocal.m4 (props changed) vendor/bsnmp/dist/config/Makefile.build (props changed) vendor/bsnmp/dist/config/Makefile.post (props changed) vendor/bsnmp/dist/config/Makefile.pre (props changed) vendor/bsnmp/dist/config/config.guess (props changed) vendor/bsnmp/dist/config/config.sub (props changed) vendor/bsnmp/dist/config/install.sh (props changed) vendor/bsnmp/dist/config/ltmain.sh (props changed) vendor/bsnmp/dist/config/mkinstalldirs (props changed) vendor/bsnmp/dist/configure (props changed) vendor/bsnmp/dist/configure.ac (props changed) vendor/bsnmp/dist/gensnmpdef/Makefile.in (props changed) vendor/bsnmp/dist/gensnmpdef/gensnmpdef.1 (props changed) vendor/bsnmp/dist/gensnmpdef/gensnmpdef.c (props changed) vendor/bsnmp/dist/gensnmptree/Makefile.in (props changed) vendor/bsnmp/dist/gensnmptree/gensnmptree.1 (props changed) vendor/bsnmp/dist/gensnmptree/gensnmptree.c (props changed) vendor/bsnmp/dist/lib/Makefile.in (props changed) vendor/bsnmp/dist/lib/asn1.3 (props changed) vendor/bsnmp/dist/lib/asn1.c (props changed) vendor/bsnmp/dist/lib/asn1.h (props changed) vendor/bsnmp/dist/lib/bsnmpagent.3 (props changed) vendor/bsnmp/dist/lib/bsnmpclient.3 (props changed) vendor/bsnmp/dist/lib/bsnmplib.3 (props changed) vendor/bsnmp/dist/lib/snmp.c (props changed) vendor/bsnmp/dist/lib/snmp.h (props changed) vendor/bsnmp/dist/lib/snmpagent.c (props changed) vendor/bsnmp/dist/lib/snmpagent.h (props changed) vendor/bsnmp/dist/lib/snmpclient.c (props changed) vendor/bsnmp/dist/lib/snmpclient.h (props changed) vendor/bsnmp/dist/lib/snmppriv.h (props changed) vendor/bsnmp/dist/lib/support.c (props changed) vendor/bsnmp/dist/lib/support.h (props changed) vendor/bsnmp/dist/oid-list (props changed) vendor/bsnmp/dist/snmp_mibII/BEGEMOT-IP-MIB.txt (props changed) vendor/bsnmp/dist/snmp_mibII/BEGEMOT-MIB2-MIB.txt (props changed) vendor/bsnmp/dist/snmp_mibII/mibII.c (props changed) vendor/bsnmp/dist/snmp_mibII/mibII.h (props changed) vendor/bsnmp/dist/snmp_mibII/mibII_begemot.c (props changed) vendor/bsnmp/dist/snmp_mibII/mibII_ifmib.c (props changed) vendor/bsnmp/dist/snmp_mibII/mibII_ifstack.c (props changed) vendor/bsnmp/dist/snmp_mibII/mibII_interfaces.c (props changed) vendor/bsnmp/dist/snmp_mibII/mibII_ip.c (props changed) vendor/bsnmp/dist/snmp_mibII/mibII_ipaddr.c (props changed) vendor/bsnmp/dist/snmp_mibII/mibII_nettomedia.c (props changed) vendor/bsnmp/dist/snmp_mibII/mibII_rcvaddr.c (props changed) vendor/bsnmp/dist/snmp_mibII/mibII_route.c (props changed) vendor/bsnmp/dist/snmp_mibII/mibII_tcp.c (props changed) vendor/bsnmp/dist/snmp_mibII/mibII_tree.def (props changed) vendor/bsnmp/dist/snmp_mibII/mibII_udp.c (props changed) vendor/bsnmp/dist/snmp_mibII/snmp_mibII.3 (props changed) vendor/bsnmp/dist/snmp_mibII/snmp_mibII.h (props changed) vendor/bsnmp/dist/snmp_ntp/BEGEMOT-NTP-MIB.txt (props changed) vendor/bsnmp/dist/snmp_ntp/Makefile.in (props changed) vendor/bsnmp/dist/snmp_ntp/NTP-MIB.txt (props changed) vendor/bsnmp/dist/snmp_ntp/NTP-PROXY-MIB.txt (props changed) vendor/bsnmp/dist/snmp_ntp/ntp_tree.def (props changed) vendor/bsnmp/dist/snmp_ntp/snmp_ntp.c (props changed) vendor/bsnmp/dist/snmpd/.gdbinit (props changed) vendor/bsnmp/dist/snmpd/BEGEMOT-MIB.txt (props changed) vendor/bsnmp/dist/snmpd/BEGEMOT-SNMPD.txt (props changed) vendor/bsnmp/dist/snmpd/FOKUS-MIB.txt (props changed) vendor/bsnmp/dist/snmpd/Makefile.in (props changed) vendor/bsnmp/dist/snmpd/action.c (props changed) vendor/bsnmp/dist/snmpd/bsnmpd.1 (props changed) vendor/bsnmp/dist/snmpd/config.c (props changed) vendor/bsnmp/dist/snmpd/export.c (props changed) vendor/bsnmp/dist/snmpd/main.c (props changed) vendor/bsnmp/dist/snmpd/snmpd.config (props changed) vendor/bsnmp/dist/snmpd/snmpd.h (props changed) vendor/bsnmp/dist/snmpd/snmpd.sh (props changed) vendor/bsnmp/dist/snmpd/snmpmod.3 (props changed) vendor/bsnmp/dist/snmpd/snmpmod.h (props changed) vendor/bsnmp/dist/snmpd/trans_lsock.c (props changed) vendor/bsnmp/dist/snmpd/trans_lsock.h (props changed) vendor/bsnmp/dist/snmpd/trans_udp.c (props changed) vendor/bsnmp/dist/snmpd/trans_udp.h (props changed) vendor/bsnmp/dist/snmpd/trap.c (props changed) vendor/bsnmp/dist/snmpd/tree.def (props changed)
svn commit: r186360 - in vendor/libbegemot: 1.1.1 1.1.1/contrib dist dist/contrib
Author: harti Date: Sat Dec 20 17:30:32 2008 New Revision: 186360 URL: http://svn.freebsd.org/changeset/base/186360 Log: Flatten the libbegemot vendor area. Added: vendor/libbegemot/1.1.1/rpoll.c - copied unchanged from r186358, vendor/libbegemot/1.1.1/contrib/libbegemot/rpoll.c vendor/libbegemot/1.1.1/rpoll.h - copied unchanged from r186358, vendor/libbegemot/1.1.1/contrib/libbegemot/rpoll.h vendor/libbegemot/1.1.1/rpoll.man - copied unchanged from r186358, vendor/libbegemot/1.1.1/contrib/libbegemot/rpoll.man vendor/libbegemot/dist/rpoll.c - copied unchanged from r186358, vendor/libbegemot/dist/contrib/libbegemot/rpoll.c vendor/libbegemot/dist/rpoll.h - copied unchanged from r186358, vendor/libbegemot/dist/contrib/libbegemot/rpoll.h vendor/libbegemot/dist/rpoll.man - copied unchanged from r186358, vendor/libbegemot/dist/contrib/libbegemot/rpoll.man Deleted: vendor/libbegemot/1.1.1/contrib/ vendor/libbegemot/dist/contrib/ Copied: vendor/libbegemot/1.1.1/rpoll.c (from r186358, vendor/libbegemot/1.1.1/contrib/libbegemot/rpoll.c) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libbegemot/1.1.1/rpoll.c Sat Dec 20 17:30:32 2008 (r186360, copy of r186358, vendor/libbegemot/1.1.1/contrib/libbegemot/rpoll.c) @@ -0,0 +1,714 @@ +/* + * Copyright (c)1996-2002 by Hartmut Brandt + * All rights reserved. + * + * Author: Hartmut Brandt + * + * Redistribution of this software and documentation and use in source and + * binary forms, with or without modification, are permitted provided that + * the following conditions are met: + * + * 1. Redistributions of source code or documentation must retain the above + * copyright notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE AUTHOR + * AND ITS CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE AUTHOR OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, + * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/* + * These functions try to hide the poll/select/setitimer interface from the + * user. You associate callback functions with file descriptors and timers. + * + * $Begemot: libbegemot/rpoll.c,v 1.14 2004/09/21 15:59:00 brandt Exp $ + */ +# include stdio.h +# include stdlib.h +# include stddef.h +# include stdarg.h +# include signal.h +# include string.h +# include errno.h +# include time.h +# include assert.h +# include unistd.h +# include sys/time.h + +/* + * There happens to be linuxes which read siginfo.h when including + * signal.h, which, for no appearent reason, defines these symbols. + */ +# ifdef POLL_IN +# undef POLL_IN +# endif +# ifdef POLL_OUT +# undef POLL_OUT +# endif + +# include rpoll.h + +/* +# define DEBUG +*/ + +# ifdef USE_POLL +# ifdef NEED_POLL_XOPEN_TWIDDLE +# define __USE_XOPEN +# endif +# include poll.h +# ifdef NEED_POLL_XOPEN_TWIDDLE +# undef __USE_XOPEN +# endif +# include stropts.h +# endif + +/* + * the second define is for Linux, which sometimes fails to + * declare INFTIM. + */ +# if defined(USE_SELECT) || !defined(INFTIM) +# define INFTIM (-1) +# endif + +# if defined(SIGPOLL) +# define SIGNAL SIGPOLL +# else +# if defined(SIGIO) +# define SIGNAL SIGIO +# endif +# endif + +# ifdef USE_POLL +# define poll_in (POLLIN | POLLRDNORM | POLLRDBAND | POLLPRI) +# define poll_out (POLLOUT | POLLWRNORM | POLLWRBAND) +# define poll_except (POLLERR | POLLHUP) +# endif + +# ifdef BROKEN_SELECT_PROTO +# define SELECT_CAST(P) (int *)P +# else +# define SELECT_CAST(P) P +# endif + + +typedef signed long long tval_t; + +static inline tval_t GETMSECS(void); + +static inline tval_t +GETMSECS(void) { + struct timeval tval; + + (void)gettimeofday(tval, NULL); + return (tval_t)tval.tv_sec*1000+tval.tv_usec/1000; +} + +/* + * Simple fatal exit. + */ +static void +_panic(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + fprintf(stderr, panic: ); + vfprintf(stderr, fmt, ap); + fprintf(stderr, \n); + va_end
svn commit: r186361 - vendor/libbegemot/dist
Author: harti Date: Sat Dec 20 17:31:57 2008 New Revision: 186361 URL: http://svn.freebsd.org/changeset/base/186361 Log: Remove the svn:keywords property from the vendor files. Modified: vendor/libbegemot/dist/rpoll.c (props changed) vendor/libbegemot/dist/rpoll.h (props changed) vendor/libbegemot/dist/rpoll.man (props changed) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org