This is a multi-part message in MIME format.

--===============1691796497==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C88303.6B4B5710"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C88303.6B4B5710
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,

=20

I'm using Release 5.3.1; and got a problem in receiving notifications
which includes a DateAndTime type object.=20

=20

The routine send_v2trap(var_list) is called. To build the var_list, the
snmp_varlist_add_variable( ) is called as below:

snmp_varlist_add_variable(&var_list,

=20
notificationEventTime_oid,

=20
OID_LENGTH(notificationEventTime_oid),

ASN_OCTET_STR,

notif->time,

8);

=20

The notf->time is define as char time[12].

=20

It works fine when the hours and minutes are non-zero values. For
example, when notif->time is assigned 0x07, 0xd8, 0x03, 0x0a, 0x0c,
0x0e, 0x0a, 0x0, the notificationEventTime in the notification message
received by manager (MG-SOFT) is: 2008-3-10,12:14:10.0. It's coorect.

=20

However, if the hours =3D 0, {0x07, 0xd8, 0x03, 0x0a, 0x0, 0x0e, 0x0a,
0x0} then the notificationEventTime in the notification message received
by the manager becomes: 2008-3-10,0:0:0.0; i.e., the minutes and seconds
incorrectly become 0, Similar situation happens to the minutes: if
minutes is 0, the seconds incorrectly becomes 0.

=20

I used Ethereal to capture the data, it's the same as MG-SOFT got.

=20

I'll appreciate any help.

=20

John Wang =20

=20

=20


------_=_NextPart_001_01C88303.6B4B5710
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

=3D"urn:schemas-microsoft-comfficeffice" =
xmlns:w=3D"urn:schemas-microsoft-comffice:word" =
xmlns:x=3D"urn:schemas-microsoft-comffice:excel" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Dus-ascii">









style=3D'font-size:10.0pt;
font-family:Arial'>Hi,>>



style=3D'font-size:10.0pt;
font-family:Arial'>>



style=3D'font-size:10.0pt;
font-family:Arial'>I’m using Release 5.3.1; and got a problem in
receiving notifications which includes a DateAndTime type object. =
>>



style=3D'font-size:10.0pt;
font-family:Arial'>>



style=3D'font-size:10.0pt;
font-family:Arial'>The routine send_v2trap(var_list) is called. To build =
the
var_list, the snmp_varlist_add_variable( ) is called as =
below:>>



style=3D'font-size:10.0pt;
font-family:Arial'>         =
   =
snmp_varlist_add_variable(&var_list,>>



style=3D'font-size:10.0pt;
font-family:Arial'>         =
            &=
nbsp;       
            &=
nbsp;     =
   notificationEventTime_oid,>>

=


style=3D'font-size:10.0pt;
font-family:Arial'>         =
            
            &=
nbsp;           &n=
bsp;    OID_LENGTH(notificationEventTime_oid),> o>



style=3D'font-size:10.0pt;
font-family:Arial'>         =
            &=
nbsp;       
            &=
nbsp;        ASN_OCTET_STR,><=
/o>



style=3D'font-size:10.0pt;
font-family:Arial'>         =
           
            &=
nbsp;           &n=
bsp;     notif->time,>>

>



style=3D'font-size:10.0pt;
font-family:Arial'>         =
            &=
nbsp;      
            &=
nbsp;         8);>>=



style=3D'font-size:10.0pt;
font-family:Arial'>>



style=3D'font-size:10.0pt;
font-family:Arial'>The notf->time is define as char =
time[12].>>



style=3D'font-size:10.0pt;
font-family:Arial'>>



style=3D'font-size:10.0pt;
font-family:Arial'>It works fine when the hours and minutes are non-zero =
values.
For example, when notif->time is assigned 0x07, 0xd8, 0x03, 0x0a, =
0x0c,
0x0e, 0x0a, 0x0, the notificationEventTime in the notification message =
received
by manager (MG-SOFT) is: 2008-3-10,12:14:10.0. It’s =
coorect.>>



style=3D'font-size:10.0pt;
font-family:Arial'>>



style=3D'font-size:10.0pt;
font-family:Arial'>However, if the hours =3D 0, {0x07, 0xd8, 0x03, 0x0a, =
0x0,
0x0e, 0x0a, 0x0} then the notificationEventTime in the notification =
message received
by the manager becomes: 2008-3-10,0:0:0.0; i.e., the minutes and seconds
incorrectly become 0, Similar situation happens to the minutes: if =
minutes is
0, the seconds incorrectly becomes 0.>>



style=3D'font-size:10.0pt;
font-family:Arial'>>



style=3D'font-size:10.0pt;
font-family:Arial'>I used Ethereal to capture the data, it’s the =
same as
MG-SOFT got.>>



style=3D'font-size:10.0pt;
font-family:Arial'>>



style=3D'font-size:10.0pt;
font-family:Arial'>I’ll appreciate any =
help.>>



style=3D'font-size:10.0pt;
font-family:Arial'>>



style=3D'font-size:10.0pt;
font-family:Arial'>John Wang  >>



style=3D'font-size:10.0pt;
font-family:Arial'>>



style=3D'font-size:10.0pt;
font-family:Arial'>>









------_=_NextPart_001_01C88303.6B4B5710--


--===============1691796497==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--===============1691796497==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
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

--===============1691796497==--