Re: [Linuxptp-devel] [PATCH_SNMPD_v2 4/6] snmpd: Add snmp sub agent

2018-06-18 Thread Anders Selhammer
Friday, June 15, 2018 4:36 PM > This won't work. The 'dirs' are only the built in include paths from > gcc, and the sysroot containing net-snmp-config will be somewhere > else. > Let's try something else: > If CROSS_COMPILE is empty, just test `which net-snmp-config`, and if > it doesn't fail,

Re: [Linuxptp-devel] [PATCH_SNMPD_v2 4/6] snmpd: Add snmp sub agent

2018-06-16 Thread Richard Cochran
On Fri, Jun 15, 2018 at 12:30:15PM +, Anders Selhammer wrote: > Will you be able to try this cross compiling and see if it works with the > updated > version (I can send in a updated version if that is the case)? I really want this series to go forward. If you do the rest, I'll take care

Re: [Linuxptp-devel] [PATCH_SNMPD_v2 4/6] snmpd: Add snmp sub agent

2018-06-15 Thread Richard Cochran
On Fri, Jun 15, 2018 at 07:36:01AM -0700, Richard Cochran wrote: > Yes, please post v2, and I will test it with cross compiling, with and I mean, v3 of course. Thanks, Richard -- Check out the vibrant tech community on

Re: [Linuxptp-devel] [PATCH_SNMPD_v2 4/6] snmpd: Add snmp sub agent

2018-06-15 Thread Richard Cochran
On Fri, Jun 15, 2018 at 12:30:15PM +, Anders Selhammer wrote: > # Look for libsnmp presence > for d in $dirs; do > files=$(find $d -type f -name net-snmp-agent-includes.h) > for f in $files; do > if grep -q NET_SNMP_AGENT_INCLUDES_H

Re: [Linuxptp-devel] [PATCH_SNMPD_v2 4/6] snmpd: Add snmp sub agent

2018-06-15 Thread Anders Selhammer
Thursday, June 14, 2018 6:40 AM > This won't work when cross compiling. That is an important use case, > and we should support it. Will do the check like done for clock_adjtime user_flags() { # Needed for vasprintf(). printf " -D_GNU_SOURCE" # Get list of directories

Re: [Linuxptp-devel] [PATCH_SNMPD_v2 4/6] snmpd: Add snmp sub agent

2018-06-14 Thread Richard Cochran
On Thu, Jun 14, 2018 at 07:14:05AM +, Anders Selhammer wrote: > I did not add any printouts for this in the patch, but can off course add it. No need for that. I was just curious, and I want to test this code soon... Thanks, Richard

Re: [Linuxptp-devel] [PATCH_SNMPD_v2 4/6] snmpd: Add snmp sub agent

2018-06-14 Thread Anders Selhammer
Thursday, June 14, 2018 6:44 AM > Please forgive my ignorance, but this minimal program is functional, > right? > What does it do? How does one test it to see that it is working? At this point, the subagent only register itself towards the master agent, which is provided by the lib. It has not

Re: [Linuxptp-devel] [PATCH_SNMPD_v2 4/6] snmpd: Add snmp sub agent

2018-06-13 Thread Richard Cochran
On Tue, May 29, 2018 at 11:42:15PM +0200, Anders Selhammer wrote: > +int main(int argc, char *argv[]) > +{ > + int err = 0; > + > + if (handle_term_signals()) { > + return -1; > + } > + > + if (open_snmp()) { > + return -1; > + } > + > + while

Re: [Linuxptp-devel] [PATCH_SNMPD_v2 4/6] snmpd: Add snmp sub agent

2018-06-13 Thread Richard Cochran
On Tue, May 29, 2018 at 11:42:15PM +0200, Anders Selhammer wrote: > diff --git a/incdefs.sh b/incdefs.sh > index 19e620e..d8ae7d5 100755 > --- a/incdefs.sh > +++ b/incdefs.sh > @@ -88,5 +88,16 @@ kernel_flags() > fi > } > > -flags="$(user_flags)$(kernel_flags)" > +# > +# Look for libsnmp