Try #2 (a little mnore in depth) Try #1 

localhost/127.0.0.1 at port 1049 with length 52 says:
48:-126:0:48:2:1:0:4:6:112:117:98:108:105:99:-96:-126:0:33:2:4:124:85:27:91:2:1:0:2:1:0:48:-126:0:17:48:-126:0:13:6:9:43:6:1:2:1:1:1:5:0:5:0:


build sequence
0 48
1 130
build_int (version 0 (242))
2 null
3 length of message sequence
4 2
5 2
6 0
7 242
build string (community)
8 4 type
9 6 length
10->15 public community
build sequence
17 160 pdu->command
18 130 length !!reverse?!!!
19 32 length of pdu sequence
build int (requid)
20 2 field type int
21 4 field len 4
22-> 25 6152386505 random id (36,171,203,250)
build int (error status)
26 2 type
27 1 len
28 0 value
buildint (error index)
29 2 type
30 1 len
31 0 value
build unsigned int 
32 0 (timestamp 0)
build sequence 
34 48 type
35 130 length (16) length of varible binding seq
store variables snmp_build_var_op(snmp.c)
build sequence
36 48 type
37 130 length
build objid
switch on type
 check others
->build null
38  null 
39 12 var field length
40 6 var length
41 8 type ?
42 43 ? position ?
43 6 ?
44 1 ?
45 2  type int
46 1  ?
47 1 var pos 1
48 5 var pos 2
49 0 var pos 3
50 5 ? end ?
51 0 ?
52 0 ?

done---store variables--

position meaning default
0 version 48
1 T len total packet length
2 break null
3 break length remain
4 version start
5 version length
6 version version...
7 type 4 (string?)
8 com len comunity length
9 .. 14 comity public
15 commandcommand
16 command length?
17 requid type = int
18 requid length remain
19..24 requid 59,109,88,49->997021745 (random?)
25 errstat type = int (2)
26 errstat length 2
27 errstat 0
28 errstat actual (0)
29 errindex type = int (2)
30 errindex length 2
31 errindex 0
32 errindex actual (0)
33 type  *data++ = type; constructor/sequence (48)
34    rm len *data++ = (u_char)(0x02 | ASN_LONG_LEN);
35    *data++ = (u_char)((length >> 8) & 0xFF);
36    *data++ = (u_char)(length & 0xFF);
37 sequence +4
38 seq len?
39