Re: curl/libcurl SNMP protocol support

2016-08-11 Thread Sergei Nikulov
2016-08-11 1:12 GMT+03:00 Daniel Stenberg :
> On Wed, 10 Aug 2016, Sergei Nikulov wrote:
>
>> Wondering why LDAP is considering useful, but is SNMP is not?
>
>
> I want everything new we consider to be properly motivated by someone who
> wants to use said feature - preferably "someone" in plural. It doesn't
> matter if there's another protocol/feature to compare with that we already
> support.
>
> Everything we add to the library has to be documented, tested, maintained
> and worked on in the future - forever and ever basically. And usually we
> don't expand the developer base when we add new stuff either, so we only
> give ourselves more future work with the same amount of hands. But sure, I
> also won't stand in the way if there's a feature that fits the concept,
> there's somone prepared to use it and someone else than me will do the
> majority of the joob.
>
> If LDAP would've been suggested today, maybe I would've resisted it and
> required more motivation in a way I didn't do back then. LDAP was in fact
> added very early on (in curl 6.0 - September 1999) and I didn't have the
> same view on things that early in the project. We didn't even have "libcurl
> yet!
>

"Everything we add to the library has to be documented, tested,
maintained and worked on in the future"
Nobody argues that.

It was just a question.
Thank you all for feedback.

> --
>
>  / daniel.haxx.se
>
> ---
> List admin: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette:  https://curl.haxx.se/mail/etiquette.html



-- 
Best Regards,
Sergei Nikulov
---
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Re: curl/libcurl SNMP protocol support

2016-08-10 Thread Daniel Stenberg

On Wed, 10 Aug 2016, Sergei Nikulov wrote:


Wondering why LDAP is considering useful, but is SNMP is not?


I want everything new we consider to be properly motivated by someone who 
wants to use said feature - preferably "someone" in plural. It doesn't matter 
if there's another protocol/feature to compare with that we already support.


Everything we add to the library has to be documented, tested, maintained and 
worked on in the future - forever and ever basically. And usually we don't 
expand the developer base when we add new stuff either, so we only give 
ourselves more future work with the same amount of hands. But sure, I also 
won't stand in the way if there's a feature that fits the concept, there's 
somone prepared to use it and someone else than me will do the majority of the 
joob.


If LDAP would've been suggested today, maybe I would've resisted it and 
required more motivation in a way I didn't do back then. LDAP was in fact 
added very early on (in curl 6.0 - September 1999) and I didn't have the same 
view on things that early in the project. We didn't even have libcurl yet!


--

 / daniel.haxx.se
---
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Re: curl/libcurl SNMP protocol support

2016-08-10 Thread Sergei Nikulov
2016-08-10 18:45 GMT+03:00 Gisle Vanem via curl-library
:
> Sergei Nikulov wrote:
>
>> curl will dump object pointed by url 
>> snmp://example.com/common/1.3.6.1.2.1.1.3.0
>> It's not just another protocol :)
>
> I once did something like this. But only for Windows-SNMP.
> Not very useful with libcurl either (mostly for the trace).
> But here it is:
>   https://gist.github.com/gvanem/6c7b43fc694f0e26e3e56e99714888c7
>
> And here 'snmpmgr.exe -v snmp://router/1.3.6.1.2.1.1.1.0' gives:
> ...
> * STATE: CONNECT => WAITRESOLVE handle 0x3903ec0; line 1433 (connection #0)
> *   Trying 10.0.0.1...
> * Could not set TCP_NODELAY: Invalid arguments << [1]
> * STATE: WAITRESOLVE => WAITCONNECT handle 0x3903ec0; line 1514 (connection 
> #0)
> * Connected to router (10.0.0.1) port 161 (#0)
> * STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x3903ec0; line 1556 
> (connection #0)
> * Marked for [keep alive]: HTTP default
> * STATE: SENDPROTOCONNECT => DO handle 0x3903ec0; line 1574 (connection #0)
> * STATE: DO => DONE handle 0x3903ec0; line 1615 (connection #0)
> * multi_done
> * Connection #0 to host router left intact
> * Expire cleared
> String: Linux Snurre-Router 3.2.41-svn21039 #101 Mon Mar 25 10:30:36 CET 2013 
> mips
>

Great job!

It can be useful for querying devices from scripts as stated on curl's website.
I believe SET operation also can be added as well.

Wondering why LDAP is considering useful, but is SNMP is not?

Daniel,
What do you think?


> 
>
> [1] Winsock doesn't allow this on a SOCK_DGRAM socket.
>
> --
> --gv
> ---
> List admin: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette:  https://curl.haxx.se/mail/etiquette.html



-- 
Best Regards,
Sergei Nikulov
---
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Re: curl/libcurl SNMP protocol support

2016-08-10 Thread Gisle Vanem via curl-library
Sergei Nikulov wrote:

> curl will dump object pointed by url 
> snmp://example.com/common/1.3.6.1.2.1.1.3.0
> It's not just another protocol :)

I once did something like this. But only for Windows-SNMP.
Not very useful with libcurl either (mostly for the trace).
But here it is:
  https://gist.github.com/gvanem/6c7b43fc694f0e26e3e56e99714888c7

And here 'snmpmgr.exe -v snmp://router/1.3.6.1.2.1.1.1.0' gives:
...
* STATE: CONNECT => WAITRESOLVE handle 0x3903ec0; line 1433 (connection #0)
*   Trying 10.0.0.1...
* Could not set TCP_NODELAY: Invalid arguments << [1]
* STATE: WAITRESOLVE => WAITCONNECT handle 0x3903ec0; line 1514 (connection #0)
* Connected to router (10.0.0.1) port 161 (#0)
* STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x3903ec0; line 1556 
(connection #0)
* Marked for [keep alive]: HTTP default
* STATE: SENDPROTOCONNECT => DO handle 0x3903ec0; line 1574 (connection #0)
* STATE: DO => DONE handle 0x3903ec0; line 1615 (connection #0)
* multi_done
* Connection #0 to host router left intact
* Expire cleared
String: Linux Snurre-Router 3.2.41-svn21039 #101 Mon Mar 25 10:30:36 CET 2013 
mips



[1] Winsock doesn't allow this on a SOCK_DGRAM socket.

-- 
--gv
---
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Re: curl/libcurl SNMP protocol support

2016-08-10 Thread Sergei Nikulov
2016-08-10 16:15 GMT+03:00 Daniel Stenberg :
> On Wed, 10 Aug 2016, Sergei Nikulov wrote:
>
>>> What form would you have the response data returned in??  What ultimately
>>> are you trying to accomplish?
>>
>>
>> I believe you've ever read here https://curl.haxx.se/ about curl for what
>> it used. My idea just adding additional protocol in the list of supported.
>
>
> SNMP is not that similar to most of the other protocols curl supports though
> so I think Rich's questions are perfectly valid.
>
> Like what exactly would "curl snmp://example.com/foo" show?
>
> Out of all the possible new protocols we _could_ add to curl, I've actually
> never seen anyone ask for SNMP before. And doing it "just" to add another
> protocol seems like a lot of work for very little gain.
>

curl will dump object pointed by url snmp://example.com/common/1.3.6.1.2.1.1.3.0
It's not just another protocol :)

> --
>
>  / daniel.haxx.se
>
> ---
> List admin: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette:  https://curl.haxx.se/mail/etiquette.html



-- 
Best Regards,
Sergei Nikulov
---
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Re: curl/libcurl SNMP protocol support

2016-08-10 Thread Daniel Stenberg

On Wed, 10 Aug 2016, Sergei Nikulov wrote:

What form would you have the response data returned in??  What ultimately 
are you trying to accomplish?


I believe you've ever read here https://curl.haxx.se/ about curl for what it 
used. My idea just adding additional protocol in the list of supported.


SNMP is not that similar to most of the other protocols curl supports though 
so I think Rich's questions are perfectly valid.


Like what exactly would "curl snmp://example.com/foo" show?

Out of all the possible new protocols we _could_ add to curl, I've actually 
never seen anyone ask for SNMP before. And doing it "just" to add another 
protocol seems like a lot of work for very little gain.


--

 / daniel.haxx.se
---
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Re: curl/libcurl SNMP protocol support

2016-08-10 Thread Sergei Nikulov
2016-08-09 20:26 GMT+03:00 Rich Gray :
> Sergei Nikulov wrote:
>>
>> 9 авг. 2016 г. 7:33 PM пользователь "Rich Gray"
>> > > написал:
>>  >
>>  > Sergei Nikulov wrote:
>>  >>
>>  >> Hello All!
>>  >>
>>  >> Is anybody interest in RFC 4088 "Uniform Resource Identifier (URI)
>>  >> Scheme for the Simple Network Management Protocol (SNMP)"
>>  >> implementation in curl utility?
>>  >>
>>  >> Maybe someone already thinking about adopting Net-SNMP library as
>>  >> engine for curl SNMP GET requests?
>>  >>
>>  >> Thank you.
>>  >
>>  >
>>  > Reproducing the net-SNMP library and its command line utilities seems
>> pointless.  The ground is already well covered.
>>  >
>>
>> Do you think they already have RFC 4088 implemented?
>>
>> And able to use uri for requests?
>
>
> I do not know.  Google is your friend, I suppose.
>
> I missed that you were after URI parsing.  Seems like a front end to
> existing library/command code could do the trick if you can't find what you
> want.  Still seems like an unreasonable addition for curl given other likely
> existing solutions.  But this is just my opinion.
>
> What form would you have the response data returned in??  What ultimately
> are you trying to accomplish?
>

I believe you've ever read here https://curl.haxx.se/ about curl for
what it used.
My idea just adding additional protocol in the list of supported.

-- 
Best Regards,
Sergei Nikulov

---
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Re: curl/libcurl SNMP protocol support

2016-08-09 Thread Rich Gray

Sergei Nikulov wrote:

9 авг. 2016 г. 7:33 PM пользователь "Rich Gray" > написал:
 >
 > Sergei Nikulov wrote:
 >>
 >> Hello All!
 >>
 >> Is anybody interest in RFC 4088 "Uniform Resource Identifier (URI)
 >> Scheme for the Simple Network Management Protocol (SNMP)"
 >> implementation in curl utility?
 >>
 >> Maybe someone already thinking about adopting Net-SNMP library as
 >> engine for curl SNMP GET requests?
 >>
 >> Thank you.
 >
 >
 > Reproducing the net-SNMP library and its command line utilities seems
pointless.  The ground is already well covered.
 >

Do you think they already have RFC 4088 implemented?

And able to use uri for requests?


I do not know.  Google is your friend, I suppose.

I missed that you were after URI parsing.  Seems like a front end to 
existing library/command code could do the trick if you can't find what you 
want.  Still seems like an unreasonable addition for curl given other likely 
existing solutions.  But this is just my opinion.


What form would you have the response data returned in??  What ultimately 
are you trying to accomplish?


Rich
---
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Re: curl/libcurl SNMP protocol support

2016-08-09 Thread Sergei Nikulov
9 авг. 2016 г. 7:33 PM пользователь "Rich Gray" 
написал:
>
> Sergei Nikulov wrote:
>>
>> Hello All!
>>
>> Is anybody interest in RFC 4088 "Uniform Resource Identifier (URI)
>> Scheme for the Simple Network Management Protocol (SNMP)"
>> implementation in curl utility?
>>
>> Maybe someone already thinking about adopting Net-SNMP library as
>> engine for curl SNMP GET requests?
>>
>> Thank you.
>
>
> Reproducing the net-SNMP library and its command line utilities seems
pointless.  The ground is already well covered.
>

Do you think they already have RFC 4088 implemented?

And able to use uri for requests?

> I suppose the only thing that might be useful would be the ability to
handle simultaneous SNMP and libcurl traffic.  That would mean some way to
have the Net-SNMP library and libcurl be able to share I/O multiplexing on
fdset/select, etc.  I don't know if there are SNMP libraries that would
have the hooks to support this kind of thing.
>
> Rich
> ---
> List admin: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette:  https://curl.haxx.se/mail/etiquette.html
---
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Re: curl/libcurl SNMP protocol support

2016-08-09 Thread Rich Gray

Sergei Nikulov wrote:

Hello All!

Is anybody interest in RFC 4088 "Uniform Resource Identifier (URI)
Scheme for the Simple Network Management Protocol (SNMP)"
implementation in curl utility?

Maybe someone already thinking about adopting Net-SNMP library as
engine for curl SNMP GET requests?

Thank you.


Reproducing the net-SNMP library and its command line utilities seems 
pointless.  The ground is already well covered.


I suppose the only thing that might be useful would be the ability to handle 
simultaneous SNMP and libcurl traffic.  That would mean some way to have the 
Net-SNMP library and libcurl be able to share I/O multiplexing on 
fdset/select, etc.  I don't know if there are SNMP libraries that would have 
the hooks to support this kind of thing.


Rich
---
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

curl/libcurl SNMP protocol support

2016-08-09 Thread Sergei Nikulov
Hello All!

Is anybody interest in RFC 4088 "Uniform Resource Identifier (URI)
Scheme for the Simple Network Management Protocol (SNMP)"
implementation in curl utility?

Maybe someone already thinking about adopting Net-SNMP library as
engine for curl SNMP GET requests?

Thank you.

-- 
Best Regards,
Sergei Nikulov
---
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html