Re:
Pushpa Thimmaiah <[email protected]> Thu, 20 Mar 2025 16:24:59 +0530
| Newsgroups | gmane.network.net-snmp.devel |
|---|---|
| Message-ID | <CAASqVJVjXbYZQFuMNM5+qY4pHc1FW16vZ3WvNqrdhrHGc3s-sw@mail.gmail.com> |
--===============5041295274154928057==
Content-Type: multipart/alternative; boundary="0000000000004715df0630c3f854"
--0000000000004715df0630c3f854
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Hi All,
Can I use attribute *data to send a string token in agentx get pdu
typedef struct variable_list {
/** NULL for last variable */
struct variable_list *next_variable;
/** Object identifier of variable */
oid *name;
/** number of subid's in name */
size_t name_length;
/** ASN type of variable */
u_char type;
/** value of variable */
netsnmp_vardata val;
/** the length of the value to be copied into buf */
size_t val_len;
/** buffer to hold the OID */
oid name_loc[MAX_OID_LEN];
/** 90 percentile < 40. */
u_char buf[40];
/** (Opaque) hook for additional data */
void *data; <--------------------------------- Can I pass
string token here
/** callback to free above */
void (*dataFreeHook)(void *);
int index;
} netsnmp_variable_list;
Thanks,
Pushpa.T
On Mon, Mar 17, 2025 at 1:43=E2=80=AFPM Pushpa Thimmaiah <pushpa.thimmaiah@=
gmail.com>
wrote:
> Hi All,
>
> I am using the SNMPD master and subagent for private MIBs and would like
> to know if private data can be transmitted to the subagent along with th=
e
> set/get request data.
>
> Specifically, during an SNMP query, I need to pass a unique string token
> from SNMPD to the subagent along with the get request details. The subage=
nt
> will use this token for authentication to retrieve data from the backend.
> This token is intended to remain confidential between SNMPD and the
> subagent.
>
>
> Thanks,
>
> Pushpa.T
>
--0000000000004715df0630c3f854
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Hi All,</div><div><br></div><div>Can I use attribute =
*data to send a string token in agentx get pdu</div><div><br></div><div>typ=
edef struct variable_list {<br>=C2=A0 =C2=A0/** NULL for last variable */<b=
r>=C2=A0 =C2=A0struct variable_list *next_variable; =C2=A0 <br>=C2=A0 =C2=
=A0/** Object identifier of variable */<br>=C2=A0 =C2=A0oid =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0*name;<br>=C2=A0 =C2=A0/** number of subid's=
in name */<br>=C2=A0 =C2=A0size_t =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0name_l=
ength;<br>=C2=A0 =C2=A0/** ASN type of variable */<br>=C2=A0 =C2=A0u_char =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0type; =C2=A0 <br>=C2=A0 =C2=A0/** value o=
f variable */<br>=C2=A0 =C2=A0 netsnmp_vardata val;<br>=C2=A0 =C2=A0/** the=
length of the value to be copied into buf */<br>=C2=A0 =C2=A0size_t =C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0val_len;<br>=C2=A0 =C2=A0/** buffer to hold the=
OID */<br>=C2=A0 =C2=A0oid =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 name_=
loc[MAX_OID_LEN];<br>=C2=A0 =C2=A0/** 90 percentile < 40. */<br>=C2=A0 =
=C2=A0u_char =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0buf[40];<br>=C2=A0 =C2=A0/**=
(Opaque) hook for additional data */<br>=C2=A0 =C2=A0void =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 *data;=C2=A0 <--------------------------------- Can=
I pass string token here<br>=C2=A0 =C2=A0/** callback to free above */<br>=
=C2=A0 =C2=A0void =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(*dataFreeHook)(=
void *);<br>=C2=A0 =C2=A0int =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 inde=
x;<br>} netsnmp_variable_list;</div><div><br></div><div>Thanks,</div><div>P=
ushpa.T<br></div></div><br><div class=3D"gmail_quote gmail_quote_container"=
><div dir=3D"ltr" class=3D"gmail_attr">On Mon, Mar 17, 2025 at 1:43=E2=80=
=AFPM Pushpa Thimmaiah <<a href=3D"mailto:[email protected]">pu=
[email protected]</a>> wrote:<br></div><blockquote class=3D"gmail=
_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204=
,204);padding-left:1ex"><div dir=3D"ltr"><div>Hi All,</div><div>
<div style=3D"min-height:250px" id=3D"m_65795484717=
47230177gmail-BotResponse"><p>I
am using the SNMPD master and subagent for private MIBs and would like to =
know=C2=A0 if private data can be transmitted to the subagent along with th=
e
set/get request data.</p>
<p>Specifically, during an SNMP query, I need to pass a unique string=20
token from SNMPD to the subagent along with the get request details. The
subagent will use this token for authentication to retrieve data from=20
the backend. This token is intended to remain confidential between SNMPD
and the subagent.</p><p><br></p><p>Thanks,</p><p>Pushpa.T<br></p></div>
</div></div>
</blockquote></div>
--0000000000004715df0630c3f854--
--===============5041295274154928057==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============5041295274154928057==
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
--===============5041295274154928057==--