Re: Getting listening port number while processing request
Bart Van Assche via Net-snmp-coders <[email protected]> Wed, 8 May 2024 11:46:24 -0700
| Newsgroups | gmane.network.net-snmp.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============7218014771726159538==
Content-Type: multipart/alternative;
boundary="------------c0lMH1nb5FTyRXOPcX9Suwe5"
Content-Language: en-US
This is a multi-part message in MIME format.
--------------c0lMH1nb5FTyRXOPcX9Suwe5
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
On 5/8/24 1:42 AM, Teus Benschop wrote:
>
> I have implemented the f_setup_session() callback in=20
> the=C2=A0snmpTCPBaseDomain.h/.c files.
> This callback obtains the port number and copies that into the session=20
> object.
> Then from the session object, the local_port is available while=20
> processing the SNMP requests.
> I am happy it works and that we can use this local_port in our=20
> software, that is so helpful.
>
> The patch with the above modification is attached.
> It would be so great if this patch can make it in the official tarball=20
> of Net-SNMP.
A slightly different patch has been applied on the V5-9-patches and=20
master branches. Please take a look and please help with testing that=20
patch. See also commit 8f3cedfa723c ("libsnmp: Copy the listening port=20
number into snmp_session.local_port").
Thanks,
Bart.
--------------c0lMH1nb5FTyRXOPcX9Suwe5
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE html>
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF=
-8">
</head>
<body>
<div class=3D"moz-cite-prefix">On 5/8/24 1:42 AM, Teus Benschop wrote=
:<br>
</div>
<blockquote type=3D"cite"
cite=3D"mid:CAFueZ4y7DpjamqbC2XT=3D8H1OSM0nYyypSLCk=3DbHh1jy+B_jg0w@mail.=
gmail.com">
<meta http-equiv=3D"content-type" content=3D"text/html; charset=3DU=
TF-8">
<div dir=3D"ltr">
<div class=3D"gmail_quote"><br>
<div style=3D"font-size:small" class=3D"gmail_default">I have
implemented the f_setup_session() callback in
the=C2=A0snmpTCPBaseDomain.h/.c files.</div>
<div style=3D"font-size:small" class=3D"gmail_default">This
callback obtains the port number and copies that into the
session object.</div>
<div style=3D"font-size:small" class=3D"gmail_default">Then fro=
m
the session object, the local_port is available while
processing the SNMP requests.</div>
<div style=3D"font-size:small" class=3D"gmail_default">I am hap=
py
it works and that we can use this local_port in our
software, that is so helpful.</div>
<div style=3D"font-size:small" class=3D"gmail_default"><br>
</div>
<div style=3D"font-size:small" class=3D"gmail_default">The patc=
h
with the above modification is attached.</div>
<div style=3D"font-size:small" class=3D"gmail_default">It would=
be
so great if this patch can make it in the official tarball
of Net-SNMP.</div>
</div>
</div>
</blockquote>
<p>A slightly different patch has been applied on the V5-9-patches
and master branches. Please take a look and please help with
testing that patch. See also commit 8f3cedfa723c ("libsnmp: Copy
the listening port number into snmp_session.local_port").<br>
</p>
<p>Thanks,</p>
<p>Bart.<br>
</p>
</body>
</html>
--------------c0lMH1nb5FTyRXOPcX9Suwe5--
--===============7218014771726159538==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============7218014771726159538==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
--===============7218014771726159538==--