how to explicitly specify a snnp port number other than 161? - SNMP

This is a discussion on how to explicitly specify a snnp port number other than 161? - SNMP ; Hi, All If there is an agent, it's listening port number is not 161, say 1161. How to specify this in its manager's source code? May I use it as: netsnmp_session session; session.peername = strdup("192.168.1.2:1161"); ........ I check snmp_api.h and ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: how to explicitly specify a snnp port number other than 161?

  1. how to explicitly specify a snnp port number other than 161?

    Hi, All

    If there is an agent, it's listening port number is not 161, say 1161. How to specify this in its manager's source code? May I use it as:

    netsnmp_session session;
    session.peername = strdup("192.168.1.2:1161");
    ........

    I check snmp_api.h and found that there is a "remote_port" member in snmp_session struct, but it was outdated.

    --------------
    xiao ren
    2008-08-30


    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-users mailing list
    Net-snmp-users@lists.sourceforge.net
    Please see the following page to unsubscribe or change other options:
    https://lists.sourceforge.net/lists/...net-snmp-users


  2. Re: how to explicitly specify a snnp port number other than 161?

    >>>>> On Sat, 30 Aug 2008 22:05:59 +0800, "xiao ren" said:

    xr> May I use it as:

    xr> netsnmp_session session;
    xr> session.peername = strdup("192.168.1.2:1161");

    Yep!

    xr> I check snmp_api.h and found that there is a "remote_port" member in
    xr> snmp_session struct, but it was outdated.

    That's correct... Currently everything operates on a single transport
    string and the remote_port attribute was around before we started
    supported a number of non-port based transports.
    --
    Wes Hardaker
    Sparta, Inc.

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-users mailing list
    Net-snmp-users@lists.sourceforge.net
    Please see the following page to unsubscribe or change other options:
    https://lists.sourceforge.net/lists/...net-snmp-users


+ Reply to Thread