File: rfc2257.txt

package info (click to toggle)
doc-rfc 20181229-2
  • links: PTS, VCS
  • area: non-free
  • in suites: buster
  • size: 570,944 kB
  • sloc: xml: 285,646; sh: 107; python: 90; perl: 42; makefile: 14
file content (4483 lines) | stat: -rw-r--r-- 177,452 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483






Network Working Group                                         M. Daniele
Request for Comments: 2257                 Digital Equipment Corporation
Category: Standards Track                                      B. Wijnen
                                  T.J. Watson Research Center, IBM Corp.
                                                       D. Francisco, Ed.
                                                     Cisco Systems, Inc.
                                                            January 1998

                 Agent Extensibility (AgentX) Protocol
                               Version 1


Status of this Memo

   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.  Please refer to the current edition of the "Internet
   Official Protocol Standards" (STD 1) for the standardization state
   and status of this protocol.  Distribution of this memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (1998).  All Rights Reserved.

Table of Contents

   1 Introduction......................................................4

   2 The SNMP Framework................................................4
     2.1 A Note on Terminology.........................................4

   3 Extending the MIB.................................................5
     3.1 Motivation for AgentX.........................................5

   4 AgentX Framework..................................................6
     4.1 AgentX Roles..................................................7
     4.2 Applicability.................................................8
     4.3 Design Features of AgentX.....................................9
     4.4 Non-Goals....................................................10

   5 AgentX Encodings.................................................10
     5.1 Object Identifier............................................11
     5.2 SearchRange..................................................13
     5.3 Octet String.................................................14
     5.4 Value Representation.........................................14

   6 Protocol Definitions.............................................16
     6.1 AgentX PDU Header............................................16



Daniele, et. al.            Standards Track                     [Page 1]

RFC 2257                        AgentX                      January 1998


       6.1.1 Context..................................................19
     6.2 AgentX PDUs..................................................20
       6.2.1 The agentx-Open-PDU......................................20
       6.2.2 The agentx-Close-PDU.....................................21
       6.2.3 The agentx-Register-PDU..................................22
       6.2.4 The agentx-Unregister-PDU................................25
       6.2.5 The agentx-Get-PDU.......................................27
       6.2.6 The agentx-GetNext-PDU...................................29
       6.2.7 The agentx-GetBulk-PDU...................................30
       6.2.8 The agentx-TestSet-PDU...................................31
       6.2.9 The agentx-CommitSet, -UndoSet, -CleanupSet
             PDUs.....................................................33
       6.2.10 The agentx-Notify-PDU...................................33
       6.2.11 The agentx-Ping-PDU.....................................34
       6.2.12 The agentx-IndexAllocate-PDU............................35
       6.2.13 The agentx-IndexDeallocate-PDU..........................36
       6.2.14 The agentx-AddAgentCaps-PDU.............................37
       6.2.15 The agentx-RemoveAgentCaps-PDU..........................38
       6.2.16 The agentx-Response-PDU.................................39

   7 Elements of Procedure............................................41
     7.1 Processing AgentX Administrative Messages....................42
       7.1.1 Processing the agentx-Open-PDU...........................42
       7.1.2 Processing the agentx-IndexAllocate-PDU..................43
       7.1.3 Using the agentx-IndexAllocate-PDU.......................45
       7.1.4 Processing the agentx-IndexDeallocate-PDU................47
       7.1.5 Processing the agentx-Register-PDU.......................48
         7.1.5.1 Handling Duplicate OID Ranges........................50
       7.1.6 Processing the agentx-Unregister-PDU.....................51
       7.1.7 Processing the agentx-AddAgentCaps-PDU...................51
       7.1.8 Processing the agentx-RemoveAgentCaps-PDU................52
       7.1.9 Processing the agentx-Close-PDU..........................52
       7.1.10 Detecting Connection Loss...............................53
       7.1.11 Processing the agentx-Notify-PDU........................53
       7.1.12 Processing the agentx-Ping-PDU..........................54
     7.2 Processing Received SNMP Protocol Messages...................54
       7.2.1 Dispatching AgentX PDUs..................................55
         7.2.1.1 agentx-Get-PDU.......................................57
         7.2.1.2 agentx-GetNext-PDU...................................58
         7.2.1.3 agentx-GetBulk-PDU...................................59
         7.2.1.4 agentx-TestSet-PDU...................................60
         7.2.1.5 Dispatch.............................................60
       7.2.2 Subagent Processing of agentx-Get, GetNext,
             GetBulk-PDUs.............................................61
         7.2.2.1 Subagent Processing of the agentx-Get-PDU............61
         7.2.2.2 Subagent Processing of the
                 agentx-GetNext-PDU...................................62




Daniele, et. al.            Standards Track                     [Page 2]

RFC 2257                        AgentX                      January 1998


         7.2.2.3 Subagent Processing of the
                 agentx-GetBulk-PDU...................................62
       7.2.3 Subagent Processing of agentx-TestSet,
             -CommitSet, -UndoSet, -CleanupSet-PDUs...................63
         7.2.3.1 Subagent Processing of the
                 agentx-TestSet-PDU...................................64
         7.2.3.2 Subagent Processing of the
                 agentx-CommitSet-PDU.................................65
         7.2.3.3 Subagent Processing of the
                 agentx-UndoSet-PDU...................................65
         7.2.3.4 Subagent Processing of the
                 agentx-CleanupSet-PDU................................65
       7.2.4 Master Agent Processing of AgentX Responses..............66
         7.2.4.1 Common Processing of All AgentX Response
                 PDUs.................................................66
         7.2.4.2 Processing of Responses to agentx-Get-PDUs...........66
         7.2.4.3 Processing of Responses to
                 agentx-GetNext-PDU and agentx-GetBulk-PDU............67
         7.2.4.4 Processing of Responses to
                 agentx-TestSet-PDUs..................................68
         7.2.4.5 Processing of Responses to
                 agentx-CommitSet-PDUs................................68
         7.2.4.6 Processing of Responses to
                 agentx-UndoSet-PDUs..................................69
       7.2.5 Sending the SNMP Response-PDU............................69
       7.2.6 MIB Views................................................69
     7.3 State Transitions............................................70
       7.3.1 Set Transaction States...................................70
       7.3.2 Transport Connection States..............................71
       7.3.3 Session States...........................................73

   8 Transport Mappings...............................................74
     8.1 AgentX over TCP..............................................74
       8.1.1 Well-known Values........................................74
       8.1.2 Operation................................................74
     8.2 AgentX over UNIX-domain Sockets..............................75
       8.2.1 Well-known Values........................................75
       8.2.2 Operation................................................75

   9 Security Considerations..........................................76

   10 Acknowledgements................................................77

   11 Authors' and Editor's Addresses.................................77

   12 References......................................................78

   13 Full Copyright Statement........................................80



Daniele, et. al.            Standards Track                     [Page 3]

RFC 2257                        AgentX                      January 1998


1.  Introduction

   This memo defines a standardized framework for extensible SNMP
   agents.  It defines processing entities called master agents and
   subagents, a protocol (AgentX) used to communicate between them, and
   the elements of procedure by which the extensible agent processes
   SNMP protocol messages.

2.  The SNMP Framework

   A management system contains:  several (potentially many) nodes, each
   with a processing entity, termed an agent, which has access to
   management instrumentation; at least one management station; and, a
   management protocol, used to convey management information between
   the agents and management stations.  Operations of the protocol are
   carried out under an administrative framework which defines
   authentication, authorization, access control, and privacy policies.

   Management stations execute management applications which monitor and
   control managed elements.  Managed elements are devices such as
   hosts, routers, terminal servers, etc., which are monitored and
   controlled via access to their management information.

   Management information is viewed as a collection of managed objects,
   residing in a virtual information store, termed the Management
   Information Base (MIB).  Collections of related objects are defined
   in MIB modules.  These modules are written using a subset of OSI's
   Abstract Syntax Notation One (ASN.1) [1], termed the Structure of
   Management Information (SMI) (see RFC 1902 [2]).

2.1.  A Note on Terminology

   The term "variable" refers to an instance of a non-aggregate object
   type defined according to the conventions set forth in the SMI (RFC
   1902, [2]) or the textual conventions based on the SMI (RFC 1903
   [3]).  The term "variable binding" normally refers to the pairing of
   the name of a variable and its associated value.  However, if certain
   kinds of exceptional conditions occur during processing of a
   retrieval request, a variable binding will pair a name and an
   indication of that exception.

   A variable-binding list is a simple list of variable bindings.

   The name of a variable is an OBJECT IDENTIFIER, which is the
   concatenation of the OBJECT IDENTIFIER of the corresponding object
   type together with an OBJECT IDENTIFIER fragment identifying the





Daniele, et. al.            Standards Track                     [Page 4]

RFC 2257                        AgentX                      January 1998


   instance.  The OBJECT IDENTIFIER of the corresponding object-type is
   called the OBJECT IDENTIFIER prefix of the variable.  For the purpose
   of exposition, the original Internet-standard

   Network Management Framework, as described in RFCs 1155 (STD 16),
   1157 (STD 15), and 1212 (STD 16), is termed the SNMP version 1
   framework (SNMPv1).  The current framework, as described in RFCs
   1902-1908, is termed the SNMP version 2 framework (SNMPv2).

3.  Extending the MIB

   New MIB modules that extend the Internet-standard MIB are
   continuously being defined by various IETF working groups.  It is
   also common for enterprises or individuals to create or extend
   enterprise-specific or experimental MIBs.

   As a result, managed devices are frequently complex collections of
   manageable components that have been independently installed on a
   managed node.  Each component provides instrumentation for the
   managed objects defined in the MIB module(s) it implements.

   Neither the SNMP version 1 nor version 2 framework describes how the
   set of managed objects supported by a particular agent may be changed
   dynamically.

3.1.  Motivation for AgentX

   This very real need to dynamically extend the management objects
   within a node has given rise to a variety of "extensible agents",
   which typically comprise

      - a "master" agent that is available on the standard transport
        address and that accepts SNMP protocol messages

      - a set of "subagents" that each contain management
        instrumentation

      - a protocol that operates between the master agent and subagents,
        permitting subagents to "connect" to the master agent, and the
        master agent to multiplex received SNMP protocol messages
        amongst the subagents.

      - a set of tools to aid subagent development, and a runtime (API)
        environment that hides much of the protocol operation between a
        subagent and the master agent.






Daniele, et. al.            Standards Track                     [Page 5]

RFC 2257                        AgentX                      January 1998


   The wide deployment of extensible SNMP agents, coupled with the lack
   of Internet standards in this area, makes it difficult to field
   SNMP-manageable applications.  A vendor may have to support several
   different subagent environments (APIs) in order to support different
   target platforms.

   It can also become quite cumbersome to configure subagents and
   (possibly multiple) master agents on a particular managed node.

   Specifying a standard protocol for agent extensibility (AgentX)
   provides the technical foundation required to solve both of these
   problems.  Independently developed AgentX-capable master agents and
   subagents will be able to interoperate at the protocol level.
   Vendors can continue to differentiate their products in all other
   respects.

4.  AgentX Framework

   Within the SNMP framework, a managed node contains a processing
   entity, called an agent, which has access to management information.

   Within the AgentX framework, an agent is further defined to consist
   of

      - a single processing entity called the master agent, which sends
        and receives SNMP protocol messages in an agent role (as
        specified by the SNMP version 1 and version 2 framework
        documents) but typically has little or no direct access to
        management information.

      - 0 or more processing entities called subagents, which are
        "shielded" from the SNMP protocol messages processed by the
        master agent, but which have access to management information.

   The master and subagent entities communicate via AgentX protocol
   messages, as specified in this memo.  Other interfaces (if any) on
   these entities, and their associated protocols, are outside the scope
   of this document.  While some of the AgentX protocol messages appear
   similar in syntax and semantics to the SNMP, bear in mind that AgentX
   is not SNMP.

   The internal operations of AgentX are invisible to an SNMP entity
   operating in a manager role.  From a manager's point of view, an
   extensible agent behaves exactly as would a non-extensible
   (monolithic) agent that has access to the same management
   instrumentation.





Daniele, et. al.            Standards Track                     [Page 6]

RFC 2257                        AgentX                      January 1998


   This transparency to managers is a fundamental requirement of AgentX,
   and is what differentiates AgentX subagents from SNMP proxy agents.

4.1.  AgentX Roles

   An entity acting in a master agent role performs the following
   functions:

      - Accepts AgentX session establishment requests from subagents.

      - Accepts registration of MIB regions by subagents.

      - Sends and accepts SNMP protocol messages on the agent's
        specified transport addresses.

      - Implements the agent role Elements of Procedure specified
        for the administrative framework applicable to the SNMP protocol
        message, except where they specify performing management
        operations.  (The application of MIB views, and the access
        control policy for the managed node, are implemented by the
        master agent.)

      - Provides instrumentation for the MIB objects defined in RFC
        1907 [5], and for any MIB objects relevant to any administrative
        framework it supports.

      - Sends and receives AgentX protocol messages to access
        management information, based on the current registry of MIB
        regions.

      - Forwards notifications on behalf of subagents.

   An entity acting in a subagent role performs the following functions:

      - Initiates an AgentX session with the master agent.

      - Registers MIB regions with the master agent.

      - Instantiates managed objects.

      - Binds OIDs within its registered MIB regions to actual
        variables.

      - Performs management operations on variables.

      - Initiates notifications.





Daniele, et. al.            Standards Track                     [Page 7]

RFC 2257                        AgentX                      January 1998


4.2  Applicability

   It is intended that this memo specify the smallest amount of required
   behavior necessary to achieve the largest benefit, that is, to cover
   a very large number of possible MIB implementations and
   configurations with minimum complexity and low "cost of entry".

   This section discusses several typical usage scenarios.

   1) Subagents implement separate MIB modules--for example,
      subagent A implements "mib-2", subagent b implements "host-
      resources".

      It is anticipated that this will be the most common subagent
      configuration.

   2) Subagents implement rows in a "simple table".  A simple table
      is one in which row creation is not specified, and for which the
      MIB does not define an object that counts entries in the table.
      Examples of simple tables are rdbmsDbTable, udpTable, and
      hrSWRunTable.

      This is the most commonly defined type of MIB table, and probably
      represents the next most typical configuration that AgentX would
      support.

   3) Subagents share MIBs along non-row partitions.  Subagents
      register "chunks" of the MIB that represent multiple rows, due to
      the nature of the MIB's index structure.  Examples include
      registering ipNetToMediaEntry.n, where n represents the ifIndex
      value for an interface implemented by the subagent, and
      tcpConnEntry.a.b.c.d, where a.b.c.d represents an IP address on an
      interface implemented by the subagent.

   AgentX supports these three common configurations, and all
   permutations of them, completely.  The consensus is that they
   comprise a very large majority of current and likely future uses of
   multi-vendor extensible agent configurations.

   4) Subagents implement rows in "complex tables".  Complex tables
      here are defined as tables permitting row creation, or whose MIB
      also defines an object that counts entries in the table.  Examples
      include the MIB-2 ifTable (due to ifNumber), and the RMON
      historyControlTable.







Daniele, et. al.            Standards Track                     [Page 8]

RFC 2257                        AgentX                      January 1998


   The subagent that implements such a counter object (like ifNumber)
   must go beyond AgentX to correctly implement it.  This is an
   implementation issue (and most new MIB designs no longer include such
   objects).

   To implement row creation in such tables, at least one AgentX
   subagent must register at a point "higher" in the OID tree than an
   individual row (per AgentX's dispatching procedure).  Again, this is
   an implementation issue.

   Scenarios in this category were thought to occur somewhat rarely in
   configurations where subagents are independently implemented by
   different vendors.  The focus of a standard protocol, however, must
   be in just those areas where multi- vendor interoperability must be
   assured.

   Note that it would be inefficient (due to AgentX registration
   overhead) to share a table among AgentX subagents if the table
   contains very dynamic instances, and each subagent registers fully
   qualified instances.  ipRouteTable could be an example of such a
   table in some environments.

4.3.  Design Features of AgentX

   The primary features of the design described in this memo are:

   1) A general architectural division of labor between master agent
      and subagent: The master agent is MIB ignorant and SNMP
      omniscient, while the subagent is SNMP ignorant and MIB omniscient
      (for the MIB variables it instantiates).  That is, master agents,
      exclusively, are concerned with SNMP protocol operations and the
      translations to and from AgentX protocol operations needed to
      carry them out; subagents are exclusively concerned with
      management instrumentation; and neither should intrude on the
      other's territory.

   2) A standard protocol and "rules of engagement" to enable
      interoperability between management instrumentation and extensible
      agents.

   3) Mechanisms for independently developed subagents to
      integrate into the extensible agent on a particular managed node
      in such a way that they need not be aware of any other existing
      subagents.







Daniele, et. al.            Standards Track                     [Page 9]

RFC 2257                        AgentX                      January 1998


   4) A simple, deterministic registry and dispatching algorithm.
      For a given extensible agent configuration, there is a single
      subagent who is "authoritative" for any particular region of the
      MIB (where "region" may extend from an entire MIB down to a single
      object-instance).

   5) Performance considerations.  It is likely that the master
      agent and all subagents will reside on the same host, and in such
      cases AgentX is more a form of inter-process communication than a
      traditional communications protocol.

      Some of the design decisions made with this in mind include:

         - 32-bit alignment of data within PDUs

         - Native byte-order encoding by subagents

         - Large AgentX PDU payload sizes.

4.4  Non-Goals

   1) Subagent-to-subagent communication.  This is out of scope,
      due to the security ramifications and complexity involved.

   2) Subagent access (via the master agent) to MIB variables.
      This is not addressed, since various other mechanisms are
      available and it was not a fundamental requirement.

   3) The ability to accommodate every conceivable extensible
      agent configuration option. This was the most contentious aspect
      in the development of this protocol.  In essence, certain features
      currently available in some commercial extensible agent products
      are not included in AgentX.  Although useful or even vital in some
      implementation strategies, the rough consensus was that these
      features were not appropriate for an Internet Standard, or not
      typically required for independently developed subagents to
      coexist.  The set of supported extensible agent configurations is
      described above, in Section 4.2.

   Some possible future version of the AgentX protocol may provide
   coverage for one or more of these "non-goals" or for new goals that
   might be identified after greater deployment experience.

5.  AgentX Encodings

   AgentX PDUs consist of a common header, followed by PDU-specific data
   of variable length.  Unlike SNMP PDUs, AgentX PDUs are not encoded
   using the BER (as specified in ISO 8824 [1]), but are transmitted as



Daniele, et. al.            Standards Track                    [Page 10]

RFC 2257                        AgentX                      January 1998


   a contiguous byte stream.  The data within this stream is organized
   to provide natural alignment with respect to the start of the PDU,
   permitting direct (integer) access by the processing entities.

   The first four fields in the header are single-byte values.  A bit
   (NETWORK_BYTE_ORDER) in the third field (h.flags) is used to indicate
   the byte ordering of all multi-byte integer values in the PDU,
   including those which follow in the header itself.  This is described
   in more detail in Section 6.1, "AgentX PDU Header", below.

   PDUs are depicted in this memo using the following convention (where
   byte 1 is the first transmitted byte):

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  byte 1       |  byte 2       |  byte 3       |  byte 4       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  byte 5       |  byte 6       |  byte 7       |  byte 8       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Fields marked "<reserved>" are reserved for future use and must be
   zero-filled.

5.1.  Object Identifier

   An object identifier is encoded as a 4-byte header, followed by a
   variable number of contiguous 4-byte fields representing sub-
   identifiers.  This representation (termed Object Identifier) is as
   follows:

   Object Identifier

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  n_subid      |  prefix       |  include      |  <reserved>   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       sub-identifier #1                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       sub-identifier #n_subid                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Object Identifier header fields:

      n_subid

         The number (0-128) of sub-identifiers in the object identifier.
         An ordered list of "n_subid" 4-byte sub-identifiers follows the
         4-byte header.




Daniele, et. al.            Standards Track                    [Page 11]

RFC 2257                        AgentX                      January 1998


      prefix

         An unsigned value used to reduce the length of object
         identifier encodings.  A non-zero value "x" is interpreted as
         the first sub-identifier after "internet" (1.3.6.1), and
         indicates an implicit prefix "internet.x" to the actual sub-
         identifiers encoded in the Object Identifier.  For example, a
         prefix field value 2 indicates an implicit prefix "1.3.6.1.2".
         A value of 0 in the prefix field indicates there is no prefix
         to the sub-identifiers.

      include

         Used only when the Object Identifier is the start of a
         SearchRange, as described in section 5.2.

   A null Object Identifier consists of the 4-byte header with all bytes
   set to 0.

   Examples:

   sysDescr.0 (1.3.6.1.2.1.1.1.0)

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 4             | 2             | 0             | 0             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 1                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 1                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 1                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 0                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   1.2.3.4

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 4             | 0             | 0             | 0             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 1                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 2                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 3                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 4                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Daniele, et. al.            Standards Track                    [Page 12]

RFC 2257                        AgentX                      January 1998


5.2.  SearchRange

   A SearchRange consists of two Object Identifiers.  In its
   communication with a subagent, the master agent uses a SearchRange to
   identify a requested variable binding, and, in GetNext and GetBulk
   operations, to set an upper bound on the names of managed object
   instances the subagent may send in reply.

   The first Object Identifier in a SearchRange (called the starting
   OID) indicates the beginning of the range.  It is frequently (but not
   necessarily) the name of a requested variable binding.

   The "include" field in this OID's header is a boolean value (0 or 1)
   indicating whether or not the starting OID is included in the range.

   The second object identifier indicates the non-inclusive end of the
   range, and its "include" field is always 0.

   Example:  To indicate a search range from 1.3.6.1.2.1.25.2
   (inclusive) to 1.3.6.1.2.1.25.2.1 (exclusive), the SearchRange would
   be

   (start)
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 3             | 2             | 1             |       0       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 1                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 25                                                            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 2                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   (end)
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 4             | 2             | 0             |       0       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 1                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 25                                                            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 2                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 1                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   A SearchRangeList is a contiguous list of SearchRanges.




Daniele, et. al.            Standards Track                    [Page 13]

RFC 2257                        AgentX                      January 1998


5.3.  Octet String

   An octet string is represented by a contiguous series of bytes,
   beginning with a 4-byte integer whose value is the number of octets
   in the octet string, followed by the octets themselves.  This
   representation is termed an Octet String.  If the last octet does not
   end on a 4-byte offset from the start of the Octet String, padding
   bytes are appended to achieve alignment of following data.  This
   padding must be added even if the Octet String is the last item in
   the PDU.  Padding bytes must be zero filled.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Octet String Length (L)                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Octet L - 1  |  Octet L      |       Padding (as required)   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   A null Octet String consists of a 4-byte length field set to 0.

5.4.  Value Representation

   Variable bindings may be encoded within the variable-length portion
   of some PDUs.  The representation of a variable binding (termed a
   VarBind) consists of a 2-byte type field, a name (Object Identifier),
   and the actual value data.

   VarBind

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          v.type               |          <reserved>           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   (v.name)
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  n_subid      |  prefix       |      0        |       0       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       sub-identifier #1                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       sub-identifier #n_subid                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+







Daniele, et. al.            Standards Track                    [Page 14]

RFC 2257                        AgentX                      January 1998


   (v.data)
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       data                                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       data                                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   VarBind fields:

   v.type

         Indicates the variable binding's syntax, and must be one of
         the following values:

                     Integer                  (2),
                     Octet String             (4),
                     Null                     (5),
                     Object Identifier        (6),
                     IpAddress               (64),
                     Counter32               (65),
                     Gauge32                 (66),
                     TimeTicks               (67),
                     Opaque                  (68),
                     Counter64               (70),
                     noSuchObject           (128),
                     noSuchInstance         (129),
                     endOfMibView           (130)

   v.name

         The Object Identifier which names the variable.

   v.data

         The actual value, encoded as follows:

          - Integer, Counter32, Gauge32, and TimeTicks are encoded as
            4 contiguous bytes.  If the NETWORK_BYTE_ORDER bit is set
            in h.flags, the bytes are ordered most significant to least
            significant, otherwise they are ordered least significant
            to most significant.

          - Counter64 is encoded as 8 contiguous bytes.  If the
            NETWORK_BYTE_ORDER bit is set in h.flags, the bytes are
            ordered most significant to least significant, otherwise
            they are ordered least significant to most significant.




Daniele, et. al.            Standards Track                    [Page 15]

RFC 2257                        AgentX                      January 1998


          - Object Identifiers are encoded as described in section
            5.1, Object Identifier.

          - IpAddress, Opaque, and Octet String are all octet strings
            and are encoded as described in section 5.3, Octet String.

            Value data always follows v.name whenever v.type is one
            of the above types.  These data bytes are present even if
            they will not be used (as, for example, in certain types
            of index allocation).

          - Null, noSuchObject, noSuchInstance, and endOfMibView do not
            contain any encoded value.  Value data never follows
            v.name in these cases.

         Note that the VarBind itself does not contain the value size.
         That information is implied for the fixed-length types, and
         explicitly contained in the encodings of variable-length types
         (Object Identifier and Octet String).

   A VarBindList is a contiguous list of VarBinds.  Within a
   VarBindList, a particular VarBind is identified by an index value.
   The first VarBind in a VarBindList has index value 1, the second
   has index value 2, and so on.

6.  Protocol Definitions

6.1.  AgentX PDU Header

   The AgentX PDU header is a fixed-format, 20-octet structure:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   h.version   |    h.type     |    h.flags    |  <reserved>   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          h.sessionID                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        h.transactionID                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          h.packetID                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        h.payload_length                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   An AgentX PDU header contains the following fields:

      h.version

         The version of the AgentX protocol (1 for this memo).



Daniele, et. al.            Standards Track                    [Page 16]

RFC 2257                        AgentX                      January 1998


      h.type

         The PDU type; one of the following values:

              agentx-Open-PDU             (1),
              agentx-Close-PDU            (2),
              agentx-Register-PDU         (3),
              agentx-Unregister-PDU       (4),
              agentx-Get-PDU              (5),
              agentx-GetNext-PDU          (6),
              agentx-GetBulk-PDU          (7),
              agentx-TestSet-PDU          (8),
              agentx-CommitSet-PDU        (9),
              agentx-UndoSet-PDU         (10),
              agentx-CleanupSet-PDU      (11),
              agentx-Notify-PDU          (12),
              agentx-Ping-PDU            (13),
              agentx-IndexAllocate-PDU   (14),
              agentx-IndexDeallocate-PDU (15),
              agentx-AddAgentCaps-PDU    (16),
              agentx-RemoveAgentCaps-PDU (17),
              agentx-Response-PDU        (18)

      h.flags

         A bitmask, with bit 0 the least significant bit.  The bit
         definitions are as follows:

                 Bit             Definition
                 ---             ----------
                 0               INSTANCE_REGISTRATION
                 1               NEW_INDEX
                 2               ANY_INDEX
                 3               NON_DEFAULT_CONTEXT
                 4               NETWORK_BYTE_ORDER
                 5-7             (reserved)

         The NETWORK_BYTE_ORDER bit applies to all multi-byte integer
         values in the entire AgentX packet, including the remaining
         header fields.  If set, then network byte order (most
         significant byte first; "big endian") is used.  If not set,
         then least significant byte first ("little endian") is used.

         The NETWORK_BYTE_ORDER bit applies to all AgentX PDUs.

         The NON_DEFAULT_CONTEXT bit is used only in the AgentX PDUs
         described in section 6.1.1.




Daniele, et. al.            Standards Track                    [Page 17]

RFC 2257                        AgentX                      January 1998


         The NEW_INDEX and ANY_INDEX bits are used only within the
         agentx-IndexAllocate-, and -IndexDeallocate-PDUs.

         The INSTANCE_REGISTRATION bit is used only within the agentx-
         Register-PDU.

      h.sessionID

         The session ID uniquely identifies a session over which AgentX
         PDUs are exchanged between a subagent and the master agent.
         The session ID has no significance and no defined value in the
         agentx-Open-PDU sent by a subagent to open a session with the
         master agent; in this case, the master agent will assign a
         unique sessionID that it will pass back in the corresponding
         agentx-Response-PDU.  From that point on, that same sessionID
         will appear in every AgentX PDU exchanged over that session
         between the master and the subagent.  A subagent may establish
         multiple AgentX sessions by sending multiple agentx-Open-PDUs
         to the master agent.

         In master agents that support multiple transport protocols, the
         sessionID should be globally unique rather than unique just to
         a particular transport.

      h.transactionID

         The transaction ID uniquely identifies, for a given session,
         the single SNMP management request (and single SNMP PDU) with
         which an AgentX PDU is associated.  If a single SNMP management
         request results in multiple AgentX PDUs being sent by the
         master agent with the same sessionID, each of these AgentX PDUs
         must contain the same transaction ID; conversely, AgentX PDUs
         sent during a particular session, that result from distinct
         SNMP management requests, must have distinct transaction IDs
         within the limits of the 32-bit field).

         Note that the transaction ID is not the same as the SNMP PDU's
         request-id (as described in section 4.1 of RFC 1905 [4]), nor
         can it be, since a master agent might receive SNMP requests
         with the same request-ids from different managers.

         The transaction ID has no significance and no defined value in
         AgentX administrative PDUs, i.e., AgentX PDUs that are not
         associated with an SNMP management request.







Daniele, et. al.            Standards Track                    [Page 18]

RFC 2257                        AgentX                      January 1998


      h.packetID

         A packet ID generated by the sender for all AgentX PDUs except
         the agentx-Response-PDU. In an agentx-Response-PDU, the packet
         ID must be the same as that in the received AgentX PDU to which
         it is a response.  A master agent might use this field to
         associate subagent response PDUs with their corresponding
         request PDUs.  A subagent might use this field to correlate
         responses to multiple (batched) registrations.

      h.payload_length

         The size in octets of the PDU contents, excluding the 20-byte
         header.  As a result of the encoding schemes and PDU layouts,
         this value will always be either 0, or a multiple of 4.

6.1.1.  Context

   In the SNMPv1 or v2c frameworks, the community string may be used as
   an index into a local repository of configuration information that
   may include community profiles or more complex context information.
   Future versions of the SNMP will likely formalize this notion of
   "context".

   AgentX provides a mechanism for transmitting a context specification
   within relevant PDUs, but does not place any constraints on the
   content of that specification.

   An optional context field may be present in the agentx-Register-,
   UnRegister-, AddAgentCaps-, RemoveAgentCaps-, Get-, GetNext-,
   GetBulk-, IndexAllocate-, IndexDeallocate-, Notify-, TestSet-, and
   Ping- PDUs.

   If the NON_DEFAULT_CONTEXT bit in the AgentX header field h.flags is
   clear, then there is no context field in the PDU, and the operation
   refers to the default context.

   If the NON_DEFAULT_CONTEXT bit is set, then a context field
   immediately follows the AgentX header, and the operation refers to
   that specific context.  The context is represented as an Octet
   String.  There are no constraints on its length or contents.

   Thus, all of these AgentX PDUs (that is, those listed immediately
   above) refer to, or "indicate" a context, which is either the default
   context, or a non-default context explicitly named in the PDU.






Daniele, et. al.            Standards Track                    [Page 19]

RFC 2257                        AgentX                      January 1998


6.2.  AgentX PDUs

6.2.1.  The agentx-Open-PDU

   An agentx-Open-PDU is generated by a subagent to request
   establishment of an AgentX session with the master agent.

   (AgentX header)

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | h.version (1) |  h.type (1)   |    h.flags    |  <reserved>   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          h.sessionID                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        h.transactionID                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           h.packetID                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        h.payload_length                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  o.timeout    |                     <reserved>                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   (o.id)
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  n_subid      |  prefix       |       0       |  <reserved>   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             subidentifier #1                                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ...                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             subidentifier #n_subid                            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   (o.descr)
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Octet String Length (L)                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Octet L - 1  |  Octet L      |       Padding (as required)   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   An agentx-Open-PDU contains the following fields:



Daniele, et. al.            Standards Track                    [Page 20]

RFC 2257                        AgentX                      January 1998


      o.timeout

         The length of time, in seconds, that a master agent should
         allow to elapse after dispatching a message to a subagent
         before it regards the subagent as not responding.  This is a
         subagent-wide default value that may be overridden by values
         associated with specific registered MIB regions.  The default
         value of 0 indicates that no subagent-wide value is requested.

      o.id

         An Object Identifier that identifies the subagent.  Subagents
         that do not support such an notion may send a null Object
         Identifier.

      o.descr

         An Octet String containing a DisplayString describing the
         subagent.

6.2.2.  The agentx-Close-PDU

   An agentx-Close-PDU issued by either a subagent or the master agent
   terminates an AgentX session.

   (AgentX header)
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | h.version (1) |  h.type (2)   |    h.flags    |  <reserved>   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          h.sessionID                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        h.transactionID                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           h.packetID                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        h.payload_length                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  c.reason     |                     <reserved>                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   An agentx-Close-PDU contains the following field:








Daniele, et. al.            Standards Track                    [Page 21]

RFC 2257                        AgentX                      January 1998


      c.reason

         An enumerated value that gives the reason that the master agent
         or subagent closed the AgentX session.  This field may take one
         of the following values:

            reasonOther(1)
               None of the following reasons

            reasonParseError(2)
               Too many AgentX parse errors from peer

            reasonProtocolError(3)
               Too many AgentX protocol errors from peer

            reasonTimeouts(4)
               Too many timeouts waiting for peer

            reasonShutdown(5)
               Sending entity is shutting down

            reasonByManager(6)
               Due to Set operation; this reason code can be used only
               by the master agent, in response to an SNMP management
               request.

6.2.3.  The agentx-Register-PDU

   An agentx-Register-PDU is generated by a subagent for each region of
   the MIB variable naming tree (within one or more contexts) that it
   wishes to support.

    (AgentX header)
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | h.version (1) |  h.type (3)   |    h.flags    |  <reserved>   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          h.sessionID                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        h.transactionID                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           h.packetID                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        h.payload_length                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+







Daniele, et. al.            Standards Track                    [Page 22]

RFC 2257                        AgentX                      January 1998


    (r.context) (OPTIONAL)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     Octet String Length (L)                   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet L - 1  |  Octet L      |       Padding (as required)   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  r.timeout    |  r.priority   | r.range_subid |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (r.region)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  n_subid      |  prefix       |      0        |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             sub-identifier #1                                 |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             sub-identifier #n_subid                           |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (r.upper_bound)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             optional upper-bound sub-identifier               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   An agentx-Register-PDU contains the following fields:

      r.context

         An optional non-default context.

      r.timeout

         The length of time, in seconds, that a master agent should
         allow to elapse after dispatching a message to a subagent
         before it regards the subagent as not responding.  r.timeout
         applies only to messages that concern MIB objects within
         r.region.  It overrides both the subagent-wide value (if any)
         indicated when the AgentX session with the master agent was
         established, and the master agent's default timeout.  The
         default value for r.timeout is 0 (no override).




Daniele, et. al.            Standards Track                    [Page 23]

RFC 2257                        AgentX                      January 1998


      r.priority

         A value between 1 and 255, used to achieve a desired
         configuration when different subagents register identical or
         overlapping regions.  Subagents with no particular knowledge of
         priority should register with the default value of 255 (lowest
         priority).

         In the master agent's dispatching algorithm, smaller values of
         r.priority take precedence over larger values, as described in
         section 7.1.5.1.

      r.region

         An Object Identifier that, in conjunction with r.range_subid,
         indicates a region of the MIB that a subagent wishes to
         support.  It may be a fully-qualified instance name, a partial
         instance name, a MIB table, an entire MIB, or ranges of any of
         these.

         The choice of what to register is implementation-specific; this
         memo does not specify permissible values.  Standard practice
         however is for a subagent to register at the highest level of
         the naming tree that makes sense.  Registration of fully-
         qualified instances is typically done only when a subagent can
         perform management operations only on particular rows of a
         conceptual table.

         If r.region is in fact a fully qualified instance name, the
         INSTANCE_REGISTRATION bit in h.flags must be set, otherwise it
         must be cleared.  The master agent may save this information to
         optimize subsequent operational dispatching.

      r.range_subid

         Permits specifying a range in place of one of r.region's sub-
         identifiers.  If this value is 0, no range is specified.
         Otherwise the "r.range_subid"-th sub-identifier in r.region is
         a range lower bound, and the range upper bound sub-identifier
         (r.upper_bound) immediately follows r.region.

         This permits registering a conceptual row with a single PDU.
         For example, the following PDU would register row 7 of the RFC
         1573 ifTable (1.3.6.1.2.1.2.2.1.1-22.7):







Daniele, et. al.            Standards Track                    [Page 24]

RFC 2257                        AgentX                      January 1998


   (AgentX header)
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | h.version (1) |  h.type (3)   |    h.flags    |  <reserved>   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          h.sessionID                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        h.transactionID                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           h.packetID                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        h.payload_length                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   r.timeout   |  r.priority   | 5             |  <reserved>   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   (r.region)
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 6             |  2            |  0            |  <reserved>   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 1                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 2                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 2                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 1                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 1                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 7                                                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   (r.upper_bound)
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | 22                                                            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

6.2.4.  The agentx-Unregister-PDU

   The agentx-Unregister-PDU is sent by a subagent to remove a
   previously registered MIB region from the master agent's OID space.








Daniele, et. al.            Standards Track                    [Page 25]

RFC 2257                        AgentX                      January 1998


   (AgentX header)
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | h.version (1) |  h.type (4)   |    h.flags    |  <reserved>   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          h.sessionID                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        h.transactionID                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           h.packetID                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        h.payload_length                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   (u.context) OPTIONAL
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Octet String Length (L)                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Octet L - 1  |  Octet L      |       Padding (as required)   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    <reserved> |  u.priority   | u.range_subid |  <reserved>   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   (u.region)
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  n_subid      |  prefix       |      0        |  <reserved>   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             sub-identifier #1                                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             sub-identifier #n_subid                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   (u.upper_bound)
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             optional upper-bound sub-identifier               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   An agentx-Unregister-PDU contains the following fields:






Daniele, et. al.            Standards Track                    [Page 26]

RFC 2257                        AgentX                      January 1998


      u.context

         An optional non-default context.

      u.priority

         The priority at which this region was originally registered.

      u.region

         Indicates a previously-registered region of the MIB that a
         subagent no longer wishes to support.

6.2.5.  The agentx-Get-PDU

    (AgentX header)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | h.version (1) |  h.type (5)   |    h.flags    |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                          h.sessionID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.transactionID                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                           h.packetID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.payload_length                       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (g.context) OPTIONAL
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     Octet String Length (L)                   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet L - 1  |  Octet L      |       Padding (as required)   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (g.sr)

    (start 1)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  n_subid      |  prefix       |  include      |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             sub-identifier #1                                 |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+




Daniele, et. al.            Standards Track                    [Page 27]

RFC 2257                        AgentX                      January 1998


    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             sub-identifier #n_subid                           |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (end 1)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | 0             | 0             | 0             |       0       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    (start n)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  n_subid      |  prefix       |  include      |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             sub-identifier #1                                 |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...


    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             sub-identifier #n_subid                           |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (end n)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | 0             | 0             | 0             |       0       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   An agentx-Get-PDU contains the following fields:

      g.context

         An optional non-default context.

      g.sr

         A SearchRangeList containing the requested variables for this
         subagent.












Daniele, et. al.            Standards Track                    [Page 28]

RFC 2257                        AgentX                      January 1998


6.2.6.  The agentx-GetNext-PDU

    (AgentX header)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | h.version (1) |  h.type (6)   |    h.flags    |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                          h.sessionID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.transactionID                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                           h.packetID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.payload_length                       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (g.context) OPTIONAL
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     Octet String Length (L)                   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet L - 1  |  Octet L      |       Padding (as required)   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (g.sr)


    (start 1)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  n_subid      |  prefix       |  include      |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             sub-identifier #1                                 |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             sub-identifier #n_subid                           |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (end 1)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  n_subid      |  prefix       |      0        |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             sub-identifier #1                                 |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+





Daniele, et. al.            Standards Track                    [Page 29]

RFC 2257                        AgentX                      January 1998


    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             sub-identifier #n_subid                           |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...

    (start n)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  n_subid      |  prefix       |  include      |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             sub-identifier #1                                 |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             sub-identifier #n_subid                           |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (end n)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  n_subid      |  prefix       |      0        |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             sub-identifier #1                                 |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             sub-identifier #n_subid                           |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...

6.2.7.  The agentx-GetBulk-PDU

    (AgentX header)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | h.version (1) |  h.type (7)   |    h.flags    |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                          h.sessionID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.transactionID                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                           h.packetID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.payload_length                       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+








Daniele, et. al.            Standards Track                    [Page 30]

RFC 2257                        AgentX                      January 1998


    (g.context) OPTIONAL
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     Octet String Length (L)                   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet L - 1  |  Octet L      |       Padding (as required)   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             g.non_repeaters   |     g.max_repetitions         |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (g.sr) as in agentx-GetNext-PDU above
    ...

6.2.8.  The agentx-TestSet-PDU

    (AgentX header)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | h.version (1) |  h.type (8)   |    h.flags    |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                          h.sessionID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.transactionID                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                           h.packetID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.payload_length                       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (t.context) OPTIONAL
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     Octet String Length (L)                   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet L - 1  |  Octet L      |       Padding (as required)   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (t.vb)






Daniele, et. al.            Standards Track                    [Page 31]

RFC 2257                        AgentX                      January 1998


    (VarBind 1)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |          v.type               |        <reserved>             |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  n_subid      |  prefix       |      0        |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                       sub-identifier #1                       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                       sub-identifier #n_subid                 |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                       data                                    |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                       data                                    |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...


    (VarBind n)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |          v.type               |        <reserved>             |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  n_subid      |  prefix       |      0        |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                       sub-identifier #1                       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                       sub-identifier #n_subid                 |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                       data                                    |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                       data                                    |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   An agentx-TestSet-PDU contains the following fields:

      t.context

         An optional non-default context.






Daniele, et. al.            Standards Track                    [Page 32]

RFC 2257                        AgentX                      January 1998


      t.vb

         A VarBindList containing the requested VarBinds for this
         subagent.

6.2.9.  The agentx-CommitSet, -UndoSet, -CleanupSet PDUs

   These PDUs consist of the AgentX header only.

   The agentx-CommitSet-, -UndoSet-, and -Cleanup-PDUs are used in
   processing an SNMP SetRequest operation.

6.2.10.  The agentx-Notify-PDU

   An agentx-Notify-PDU is sent by a subagent to cause the master agent
   to forward a notification.

    (AgentX header)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | h.version (1) |  h.type (12)  |    h.flags    |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                          h.sessionID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.transactionID                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                           h.packetID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.payload_length                       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (n.context) OPTIONAL
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     Octet String Length (L)                   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet L - 1  |  Octet L      |       Padding (as required)   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (n.vb)
    ...


   An agentx-Notify-PDU contains the following fields:





Daniele, et. al.            Standards Track                    [Page 33]

RFC 2257                        AgentX                      January 1998


      n.context

         An optional non-default context.

      n.vb

         A VarBindList whose contents define the actual PDU to be sent.
         This memo places the following restrictions on its contents:

             - If the subagent supplies sysUpTime.0, it must be
               present as the first varbind.

             - snmpTrapOID.0 must be present, as the second
               varbind if sysUpTime.0 was supplied, as the first if it
               was not.

6.2.11  The agentx-Ping-PDU

   The agentx-Ping-PDU is sent by a subagent to the master agent to
   monitor the master agent's ability to receive and send AgentX PDUs
   over their AgentX session.

    (AgentX header)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | h.version (1) |  h.type (13)  |    h.flags    |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                          h.sessionID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.transactionID                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                           h.packetID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.payload_length                       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   (p.context) OPTIONAL
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     Octet String Length (L)                   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet L - 1  |  Octet L      |       Padding (as required)   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   An agentx-Ping-PDU may contain the following field:




Daniele, et. al.            Standards Track                    [Page 34]

RFC 2257                        AgentX                      January 1998


      p.context

         An optional non-default context.

   Using p.context a subagent can retrieve the sysUpTime value for a
   specific context, if required.

6.2.12.  The agentx-IndexAllocate-PDU

   An agentx-IndexAllocate-PDU is sent by a subagent to request
   allocation of a value for specific index objects.  Refer to section
   7.1.3 (Using the agentx-IndexAllocate-PDU) for suggested usage.

    (AgentX header)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | h.version (1) |  h.type (14)  |    h.flags    |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                          h.sessionID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.transactionID                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                           h.packetID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.payload_length                       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (i.context) OPTIONAL
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     Octet String Length (L)                   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet L - 1  |  Octet L      |       Padding (as required)   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (i.vb)
    ...

   An agentx-IndexAllocate-PDU contains the following fields:

      i.context

         An optional non-default context.






Daniele, et. al.            Standards Track                    [Page 35]

RFC 2257                        AgentX                      January 1998


      i.vb

         A VarBindList containing the index names and values requested
         for allocation.

6.2.13.  The agentx-IndexDeallocate-PDU

   An agentx-IndexDeallocate-PDU is sent by a subagent to release
   previously allocated index values.

    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | h.version (1) |  h.type (15)  |    h.flags    |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                          h.sessionID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.transactionID                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                           h.packetID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.payload_length                       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (i.context) OPTIONAL
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     Octet String Length (L)                   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet L - 1  |  Octet L      |       Padding (as required)   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (i.vb)
    ...

   An agentx-IndexDeallocate-PDU contains the following fields:

      i.context

         An optional non-default context.

      i.vb

         A VarBindList containing the index names and values to be
         released.





Daniele, et. al.            Standards Track                    [Page 36]

RFC 2257                        AgentX                      January 1998


6.2.14.  The agentx-AddAgentCaps-PDU

   An agentx-AddAgentCaps-PDU is generated by a subagent to inform the
   master agent of its agent capabilities.

    (AgentX header)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | h.version (1) |  h.type (16)  |    h.flags    |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                          h.sessionID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.transactionID                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                           h.packetID                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                        h.payload_length                       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (a.context) (OPTIONAL)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     Octet String Length (L)                   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet L - 1  |  Octet L      |       Optional Padding        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (a.id)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  n_subid      |  prefix       |      0        |  <reserved>   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             sub-identifier #1                                 |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             sub-identifier #n_subid                           |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    (a.descr)
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     Octet String Length (L)                   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+





Daniele, et. al.            Standards Track                    [Page 37]

RFC 2257                        AgentX                      January 1998


    ...
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Octet L - 1  |  Octet L      |       Optional Padding        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   An agentx-AddAgentCaps-PDU contains the following fields:

      a.context

         An optional non-default context.

      a.id

         An Object Identifier containing the value of an invocation of
         the AGENT-CAPABILITIES macro, which the master agent exports as
         a value of sysORID for the indicated context.  (Recall that the
         value of an invocation of an AGENT-CAPABILITIES macro is an
         object identifier that describes a precise level of support
         with respect to implemented MIB modules.  A more complete
         discussion of the AGENT-CAPABILITIES macro and related sysORID
         values can be found in section 6 of RFC 1904 [10].)

      a.descr

         An Octet String containing a DisplayString to be used as the
         value of sysORDescr corresponding to the sysORID value above.

6.2.15.  The agentx-RemoveAgentCaps-PDU

   An agentx-RemoveAgentCaps-PDU is generated by a subagent to request
   that the master agent stop exporting a particular value of sysORID.
   This value must have previously been advertised by the subagent in an
   agentx-AddAgentCaps-PDU.

   (AgentX header)
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | h.version (1) |  h.type (17)  |    h.flags    |  <reserved>   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          h.sessionID                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        h.transactionID                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           h.packetID                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        h.payload_length                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+





Daniele, et. al.            Standards Track                    [Page 38]

RFC 2257                        AgentX                      January 1998


   (a.context) (OPTIONAL)
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Octet String Length (L)                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Octet 1      |  Octet 2      |   Octet 3     |   Octet 4     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Octet L - 1  |  Octet L      |       Optional Padding        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   (a.id)
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  n_subid      |  prefix       |       0       |   <reserved>  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             sub-identifier #1                                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             sub-identifier #n_subid                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   An agentx-RemoveAgentCaps-PDU contains the following fields:

      a.context

         An optional non-default context.

      a.id

         An ObjectIdentifier containing the value of sysORID that should
         no longer be exported.

6.2.16.  The agentx-Response-PDU

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | h.version (1) |  h.type (18)  |    h.flags    |  <reserved>   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          h.sessionID                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        h.transactionID                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           h.packetID                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        h.payload_length                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+





Daniele, et. al.            Standards Track                    [Page 39]

RFC 2257                        AgentX                      January 1998


   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        res.sysUpTime                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             res.error         |     res.index                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ...

   An agentx-Response-PDU contains the following fields:

      h.sessionID

         If this is a response to a agentx-Open-PDU, then it contains
         the new and unique sessionID (as assigned by the master agent)
         for this session.

         Otherwise it must be identical to the h.sessionID value in the
         PDU to which this PDU is a response.

      h.transactionID

         Must be identical to the h.transactionID value in the PDU to
         which this PDU is a response.

         In an agentx response PDU from the master agent to the
         subagent, the value of h.transactionID has no significance and
         can be ignored by the subagent.

      h.packetID

         Must be identical to the h.packetID value in the PDU to which
         this PDU is a response.

      res.sysUpTime

         This field contains the current value of sysUpTime for the
         indicated context.  It is relevant only in agentx response PDUs
         sent from the master agent to a subagent in response to the
         following agentx PDUs:

               agentx-Open-PDU               (1),
               agentx-Close-PDU              (2),
               agentx-Register-PDU           (3),
               agentx-Unregister-PDU         (4),
               agentx-Ping-PDU              (13),
               agentx-IndexAllocate-PDU     (14),
               agentx-IndexDeallocate-PDU   (15),
               agentx-AddAgentCaps-PDU      (16),
               agentx-RemoveAgentCaps-PDU   (17)



Daniele, et. al.            Standards Track                    [Page 40]

RFC 2257                        AgentX                      January 1998


         In an agentx response PDU from the subagent to the master
         agent, the value of res.sysUpTime has no significance and is
         ignored by the master agent.

      res.error

         Indicates error status (including `noError').  Values are
         limited to those defined for errors in the SNMPv2 SMI (RFC 1905
         [4]), and the following AgentX-specific values:

                openFailed                 (256),
                notOpen                    (257),
                indexWrongType             (258),
                indexAlreadyAllocated      (259),
                indexNoneAvailable         (260),
                indexNotAllocated          (261),
                unsupportedContext         (262),
                duplicateRegistration      (263),
                unknownRegistration        (264),
                unknownAgentCaps           (265)

      res.index

         In error cases, this is the index of the failed variable
         binding within a received request PDU.  (Note: As explained in
         section 5.4, Value Representation, the index values of variable
         bindings within a variable binding list are 1-based.)

   A VarBindList may follow these latter two fields, depending on which
   AgentX PDU is being responded to.  These data are specified in the
   subsequent elements of procedure.

7.  Elements of Procedure

   This section describes the actions of protocol entities (master
   agents and subagents) implementing the AgentX protocol.  Note,
   however, that it is not intended to constrain the internal
   architecture of any conformant implementation.

   Specific error conditions and associated actions are described in
   various places.  Other error conditions not specifically mentioned
   fall into one of two categories, "parse" errors and "protocol"
   errors.

   A parse error occurs when a receiving entity cannot decode the PDU.
   For instance, a VarBind contains an unknown type, or a PDU contains a
   malformed Object Identifier.




Daniele, et. al.            Standards Track                    [Page 41]

RFC 2257                        AgentX                      January 1998


   A protocol error occurs when a receiving entity can parse a PDU, but
   the resulting data is unspecified.  For instance, an agentx-
   Response-PDU is successfully parsed, but contains an unknown
   res.error value.

   An implementation may choose either to ignore such messages, or to
   close the session on which they are received, using the appropriate
   reason code as defined in the agentx-Close-PDU.

   The actions of AgentX protocol entities can be broadly categorized
   under two headings, each of which is described separately:

      (1) processing AgentX administrative messages (e.g., connection
          requests from a subagent to a master agent); and

      (2) processing SNMP messages (the coordinated actions of a
          master agent and one or more subagents in processing, for
          example, a received SNMP GetRequest-PDU).

7.1.  Processing AgentX Administrative Messages

   This subsection describes the actions of AgentX protocol entities in
   processing AgentX administrative messages.  Such messages include
   those involved in establishing and terminating an AgentX session
   between a subagent and a master agent, those by which a subagent
   requests allocation of instance index values, and those by which a
   subagent communicates to a master agent which MIB regions it
   supports.

7.1.1.  Processing the agentx-Open-PDU

   When the master agent receives an agentx-Open-PDU, it processes it as
   follows:

   1) An agentx-Response-PDU is created and res.sysUpTime is set to
      the value of sysUpTime.0 for the indicated context.

   2) If the master agent is unable to open an AgentX session for
      any reason, it may refuse the session establishment request,
      sending in reply the agentx-Response-PDU, with res.error field set
      to `openFailed'.

   3) Otherwise:  The master agent assigns a sessionID to the new
      session and puts the value in the h.sessionID field of the
      agentx-Response-PDU.  This value must be unique among all existing
      open sessions.





Daniele, et. al.            Standards Track                    [Page 42]

RFC 2257                        AgentX                      January 1998


   4) The master agent retains session-specific information
      from the PDU for this subagent:

       - The NETWORK_BYTE_ORDER value in h.flags is retained.
         All subsequent AgentX protocol operations initiated by the
         master agent for this session must use this byte ordering and
         set this bit accordingly.

         The subagent typically sets this bit to correspond to its
         native byte ordering, and typically does not vary byte ordering
         for an initiated session.  The master agent must be able to
         decode each PDU according to the h.flag NETWORK_BYTE_ORDER bit
         in the PDU, but does not need to toggle its retained value for
         the session if the subagent varies its byte ordering.

       - The o.timeout value is used in calculating response
         timeout conditions for this subagent.

       - The o.id and o.descr fields are used for informational
         purposes.  (Such purposes are implementation-specific for now,
         and may be used in a possible future standard AgentX MIB.)

   5) The agentx-Response-PDU is sent with the res.error field
      set to `noError'.

   At this point, an AgentX session is considered established between
   the master agent and the subagent.  An AgentX session is a distinct
   channel for the exchange of AgentX protocol messages between a master
   agent and one subagent, qualified by the session-specific attributes
   listed in 4) above.  AgentX session establishment is initiated by the
   subagent.  An AgentX session can be terminated by either the master
   agent or the subagent.

7.1.2.  Processing the agentx-IndexAllocate-PDU

   When the master agent receives an agentx-IndexAllocate-PDU, it
   processes it as follows:

   1) An agentx-Response-PDU is created and res.sysUpTime is set to
      the value of sysUpTime.0 for the default context.

   2) If h.sessionID does not correspond to a currently established
      session with this subagent, the agentx-Response-PDU is sent in
      reply with res.error set to `notOpen'.







Daniele, et. al.            Standards Track                    [Page 43]

RFC 2257                        AgentX                      January 1998


   3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
      supports only a default context, the agentx-Response-PDU is
      returned with res.error set to `unsupportedContext', and the
      requested allocation fails.  Otherwise: The value of res.sysUpTime
      is set to the value of sysUpTime.0 for the indicated context.

   4) Each VarBind in the VarBindList is processed until either all
      are successful, or one fails.  If any VarBind fails, the agentx-
      Response-PDU is sent in reply containing the original VarBindList,
      with res.index set to indicate the failed VarBind, and with
      res.error set as described subsequently.  All other VarBinds are
      ignored; no index values are allocated.

      VarBinds are processed as follows:

      - v.name is the name of the index for which a value is to be
        allocated.

      - v.type is the syntax of the index object.

      - v.data indicates the specific index value requested.
        If the NEW_INDEX or the ANY_INDEX bit is set, the actual value
        in v.data is ignored and an appropriate index value is
        generated.

      a) If there are no currently allocated index values for v.name
         in the indicated context, and v.type does not correspond to a
         valid index type value, the VarBind fails and res.error is set
         to `indexWrongType'.

      b) If there are currently allocated index values for v.name
         in the indicated context, but the syntax of those values does
         not match v.type, the VarBind fails and res.error is set to
         `indexWrongType'.

      c) Otherwise, if both the NEW_INDEX and ANY_INDEX bits are
         clear, allocation of a specific index value is being requested.
         If the requested index is already allocated for v.name in the
         indicated context, the VarBind fails and res.error is set to
         `indexAlreadyAllocated'.

      d) Otherwise, if the NEW_INDEX bit is set, the master agent
         should generate the next available index value for v.name in
         the indicated context, with the constraint that this value must
         not have been allocated (even if subsequently released) to any
         subagent since the last re-initialization of the master agent.
         If no such value can be generated, the VarBind fails and
         res.error is set to `indexNoneAvailable'.



Daniele, et. al.            Standards Track                    [Page 44]

RFC 2257                        AgentX                      January 1998


      e) Otherwise, if the ANY_INDEX bit is set, the master agent
         should generate an index value for v.name in the indicated
         context, with the constraint that this value is not currently
         allocated to any subagent.  If no such value can be generated,
         then the VarBind fails and res.error is set to
         `indexNoneAvailable'.

   5) If all VarBinds are processed successfully, the
      agentx-Response-PDU is sent in reply with res.error set to
      `noError'.  A VarBindList is included that is identical to the one
      sent in the agentx-IndexAllocate-PDU, except that VarBinds
      requesting a NEW_INDEX or ANY_INDEX value are generated with an
      appropriate value.

7.1.3.  Using the agentx-IndexAllocate-PDU

   Index allocation is a service provided by an AgentX master agent.  It
   provides generic support for sharing MIB conceptual tables among
   subagents who are assumed to have no knowledge of each other.

   Each subagent sharing a table should first request allocation of
   index values, then use those index values to qualify MIB regions in
   its subsequent registrations.

   The master agent maintains a database of index objects (OIDs), and,
   for each index, the values that have been allocated for it.  It is
   unaware of what MIB variables (if any) the index objects represent.

   By convention, subagents use the MIB variable listed in the INDEX
   clause as the index object for which values must be allocated.  For
   tables indexed by multiple variables, values may be allocated for
   each index (although this is frequently unnecessary; see example 2
   below).  The subagent may request allocation of

        - a specific index value - an index value that is not currently
        allocated - an index value that has never been allocated

   The last two alternatives reflect the uniqueness and constancy
   requirements present in many MIB specifications for arbitrary integer
   indexes (e.g., ifIndex in the IF MIB (RFC 1573 [11]),
   snmpFddiSMTIndex in the FDDI MIB (RFC 1285 [12]), or
   sysApplInstallPkgIndex in the System Application MIB [13]).  The need
   for subagents to share tables using such indexes is the main
   motivation for index allocation in AgentX.







Daniele, et. al.            Standards Track                    [Page 45]

RFC 2257                        AgentX                      January 1998


   Example 1:

      A subagent implements an interface, and wishes to register a
      single row of the RFC 1573 ifTable.  It requests an allocation for
      the index object "ifIndex", for a value that has never been
      allocated (since ifIndex values must be unique).  The master agent
      returns the value "7".

      The subagent now attempts to register row 7 of ifTable, by
      specifying a MIB region in the agentx-Register-PDU of
      1.3.6.1.2.1.2.2.1.[1-22].7.  If the registration succeeds, no
      further processing is required.  The master agent will dispatch to
      this subagent correctly.

      But the registration may fail.  Index allocation and MIB region
      registration are not coupled in the master agent.  Some other
      subagent may have already registered ifTable row 7 without first
      having requested allocation of the index.  The current state of
      index allocations is not considered when processing registration
      requests, and the current registry is not considered when
      processing index allocation requests.  If subagents follow the
      model of "first request allocation of an index, then register the
      corresponding region", then a successful index allocation request
      gives a subagent a good hint (but no guarantee) of what it should
      be able to register.

      If the registration failed, the subagent should request allocation
      of a new index i, and attempt to register ifTable.[1-22].i, until
      successful.

   Example 2:

      This same subagent wishes to register ipNetToMediaTable rows
      corresponding to its interface (ifIndex i).  Due to structure of
      this table, no further index allocation need be done.  The
      subagent can register the MIB region ipNetToMediaTable.[1-4].i, It
      is claiming responsibility for all rows of the table whose value
      of ipNetToMediaIfIndex is i.

   Example 3:

      A network device consists of a set of processors, each of which
      accepts network connections for a unique set of IP addresses.

      Further, each processor contains a subagent that implements
      tcpConnTable.  In order to represent tcpConnTable for the entire
      managed device, the subagents need to share tcpConnTable.




Daniele, et. al.            Standards Track                    [Page 46]

RFC 2257                        AgentX                      January 1998


      In this case, no index allocation need be done at all.  Each
      subagent can register a MIB region of tcpConnTable.[1-5].a.b.c.d,
      where a.b.c.d represents an unique IP address of the individual
      processor.

      Each subagent is claiming responsibility for the region of
      tcpConnTable where the value of tcpConnLocalAddress is a.b.c.d.

7.1.4   Processing the agentx-IndexDeallocate-PDU

   When the master agent receives an agentx-IndexDeallocate-PDU, it
   processes it as follows:

   1) An agentx-Response-PDU is created and res.sysUpTime is set to
      the value of sysUpTime.0 for the default context.

   2) If h.sessionID does not correspond to a currently
      established session with this subagent, the agentx-Response-PDU is
      sent in reply with res.error set to `notOpen'.

   3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
      supports only a default context, the agentx-Response-PDU is
      returned with res.error set to `unsupportedContext', and the
      requested deallocation fails.  Otherwise: The value of
      res.sysUpTime is set to the value of sysUpTime.0 for the indicated
      context.

   4) Each VarBind in the VarBindList is processed until either all
      are successful, or one fails.  If any VarBind fails, the agentx-
      Response-PDU is sent in reply, containing the original
      VarBindList, with res.index set to indicate the failed VarBind,
      and with res.error set as described subsequently.  All other
      VarBinds are ignored; no index values are released.

      VarBinds are processed as follows:

      - v.name is the name of the index for which a value is to be
        released

      - v.type is the syntax of the index object

      - v.data indicates the specific index value to be released.
        The NEW_INDEX and ANY_INDEX bits are ignored.

      a) If the index value for the named index is not currently
         allocated to this subagent, the VarBind fails and res.error is
         set to `indexNotAllocated'.




Daniele, et. al.            Standards Track                    [Page 47]

RFC 2257                        AgentX                      January 1998


   5) If all VarBinds are processed successfully, res.error is
      set to `noError' and the agentx-Response-PDU is sent.  A
      VarBindList is included which is identical to the one sent in the
      agentx-IndexDeallocate-PDU.

      All released index values are now available, and may be used in
      response to subsequent allocation requests for ANY_INDEX values
      for the particular index.

7.1.5.  Processing the agentx-Register-PDU

   When the master agent receives an agentx-Register-PDU, it processes
   it as follows:

   1) An agentx-Response-PDU is created and res.sysUpTime is set to
      the value of sysUpTime.0 for the default context.

   2) If h.sessionID does not correspond to a currently
      established session with this subagent, the agentx-Response-PDU is
      sent in reply with res.error set to `notOpen'.

   3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
      supports only a default context, the agentx-Response-PDU is
      returned with res.error set to `unsupportedContext', and the
      requested registration fails.  Otherwise:  The value of
      res.sysUpTime is set to the value of sysUpTime.0 for the indicated
      context.

      Note: Non-default contexts might be added on the fly by
            the master agent, or the master agent might require such
            non-default contexts to be pre-configured.  The choice is
            implementation-specific.

   4) Characterize the request.

      If r.region (or any of its set of Object Identifiers, if r.range
      is non-zero) is exactly the same as any currently registered value
      of r.region (or any of its set of Object Identifiers), this
      registration is termed a duplicate region.

      If r.region (or any of its set of Object Identifiers, if r.range
      is non-zero) is a subtree of, or contains, any currently
      registered value of r.region (or any of its set of Object
      Identifiers), this registration is termed an overlapping region.

      If the NON_DEFAULT_CONTEXT bit is set, this region is to be
      logically registered within the context indicated by r.context.




Daniele, et. al.            Standards Track                    [Page 48]

RFC 2257                        AgentX                      January 1998


      Otherwise this region is to be logically registered within the
      default context.

      A registration that would result in a duplicate region with the
      same priority and within the same context as that of a current
      registration is termed a duplicate registration.

   5) Otherwise, if this is a duplicate registration, the
      agentx-Response-PDU is returned with res.error set to
      `duplicateRegistration', and the requested registration fails.

   6) Otherwise, the agentx-Response-PDU is returned with res.error
      set to `noError'.

      The master agent adds this region to its registered OID space for
      the indicated context, to be considered during the dispatching
      phase for subsequently received SNMP protocol messages.

      Note: The following algorithm describes maintaining a set of OID
      ranges derived from "splitting" registered regions.  The algorithm
      for operational dispatching is also stated in terms of these OID
      ranges.

      These OID ranges are a useful explanatory device, but are not
      required for a correct implementation.

       - If r.region (R1) is a subtree of a currently registered
         region (R2), split R2 into 3 new regions (R2a, R2b, and R2c)
         such that R2b is an exact duplicate of R1.  Now remove R2 and
         add R1, R2a, R2b, and R2c to the master agent's
         lexicographically ordered set of ranges (the registered OID
         space).  Note: Though newly-added ranges R1 and R2b are
         identical in terms of the MIB objects they contain, they are
         registered by different subagents, possibly at different
         priorities.

         For instance, if subagent S2 registered "ip" (R2 is
         1.3.6.1.2.1.4) and subagent S1 subsequently registered
         "ipNetToMediaTable" (R1 is 1.3.6.1.2.1.4.22), the resulting set
         of registered regions would be:

   1.3.6.1.2.1.4    up to but not including 1.3.6.1.2.1.4.22     (by S2)
   1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23     (by S2)
   1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23     (by S1)
   1.3.6.1.2.1.4.23 up to but not including 1.3.6.1.2.1.5        (by S2)






Daniele, et. al.            Standards Track                    [Page 49]

RFC 2257                        AgentX                      January 1998


       - If r.region (R1) overlaps one or more currently registered
         regions, then for each overlapped region (R2) split R1 into 3
         new ranges (R1a, R1b, R1c) such that R1b is an exact
         duplicate of R2.  Add R1b and R2 into the lexicographically
         ordered set of regions.  Apply (5) above iteratively to R1a and
         R1c (since they may overlap, or be subtrees of, other regions).

         For instance, given the currently registered regions in the
         example above, if subagent S3 now registers mib-2 (R1 is
         1.3.6.1.2.1) the resulting set of regions would be:

   1.3.6.1.2.1      up to but not including 1.3.6.1.2.1.4        (by S3)
   1.3.6.1.2.1.4    up to but not including 1.3.6.1.2.1.4.22     (by S2)
   1.3.6.1.2.1.4    up to but not including 1.3.6.1.2.1.4.22     (by S3)
   1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23     (by S2)
   1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23     (by S1)
   1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23     (by S3)
   1.3.6.1.2.1.4.23 up to but not including 1.3.6.1.2.1.5        (by S2)
   1.3.6.1.2.1.4.23 up to but not including 1.3.6.1.2.1.5        (by S3)
   1.3.6.1.2.1.5    up to but not including 1.3.6.1.2.2          (by S3)

   Note that at registration time a region may be split into multiple
   OID ranges due to pre-existing registrations, or as a result of any
   subsequent registration.  This region splitting is transparent to
   subagents.  Hence the master agent must always be able to associate
   any OID range with the information contained in its original agentx-
   Register-PDU.

7.1.5.1.  Handling Duplicate OID Ranges

   As a result of this registration algorithm there are likely to be
   duplicate OID ranges (regions of identical MIB objects registered to
   different subagents) in the master agent's registered OID space.
   Whenever the master agent's dispatching algorithm (see 7.2.1,
   Dispatching AgentX PDUs) results in  a duplicate OID range, the
   master agent selects one to use, termed the 'authoritative region',
   as follows:

      1) Choose the one whose original agentx-Register-PDU
         r.region contained the most subids, i.e., the most specific
         r.region.  Note: The presence or absence of a range subid has
         no bearing on how "specific" one object identifier is compared
         to another.

      2) If still ambiguous, there were duplicate regions.  Choose the
         one whose original agentx-Register-PDU specified the smaller
         value of r.priority.




Daniele, et. al.            Standards Track                    [Page 50]

RFC 2257                        AgentX                      January 1998


7.1.6.  Processing the agentx-Unregister-PDU

   1) An agentx-Response-PDU is created and res.sysUpTime is set to
      the value of sysUpTime.0 for the default context.

   2) If h.sessionID does not correspond to a currently
      established session with this subagent, the agentx-Response-PDU is
      sent in reply with res.error set to `notOpen'.

   3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
      supports only a default context, the agentx-Response-PDU is
      returned with res.error set to `unsupportedContext', and the
      requested unregistration fails.  Otherwise:  The value of
      res.sysUpTime is set to the value of sysUpTime.0 for the indicated
      context.

   4) If u.region, u.priority, and the indicated context do not match
      an existing registration made during this session, the agentx-
      Response-PDU is returned with res.error set to
      `unknownRegistration'.

   5) Otherwise, the agentx-Response-PDU is sent in reply with res.error
      set to `noError', and the previous registration is removed:

      - The master agent removes u.region from its registered OID space
        within the indicated context.  If the original region had been
        split, all such related regions are removed.

        For instance, given the example registry above, if subagent S2
        unregisters "ip", the resulting registry would be:

   1.3.6.1.2.1      up to but not including 1.3.6.1.2.1.4        (by S3)
   1.3.6.1.2.1.4    up to but not including 1.3.6.1.2.1.4.22     (by S3)
   1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23     (by S1)
   1.3.6.1.2.1.4.22 up to but not including 1.3.6.1.2.1.4.23     (by S3)
   1.3.6.1.2.1.4.23 up to but not including 1.3.6.1.2.1.5        (by S3)
   1.3.6.1.2.1.5    up to but not including 1.3.6.1.2.2          (by S3)

7.1.7.  Processing the agentx-AddAgentCaps-PDU

   When the master agent receives an agentx-AddAgentCaps-PDU, it
   processes it as follows:

   1) An agentx-Response-PDU is created and res.sysUpTime is set to
      the value of sysUpTime.0 for the default context.






Daniele, et. al.            Standards Track                    [Page 51]

RFC 2257                        AgentX                      January 1998


   2) If h.sessionID does not correspond to a currently
      established session with this subagent, the agentx-Response-PDU is
      sent in reply with res.error set to `notOpen'.

   3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
      supports only a default context, the agentx-Response-PDU is
      returned with res.error set to `unsupportedContext', and the
      requested operation fails.  Otherwise:  The value of res.sysUpTime
      is set to the value of sysUpTime.0 for the indicated context.

   4) Otherwise, the master agent adds the subagent's capabilities
      information to the sysORTable for the indicated context.  An
      agentx-Response-PDU is sent in reply with res.error set to
      `noError'.

7.1.8.  Processing the agentx-RemoveAgentCaps-PDU

   1) An agentx-Response-PDU is created and res.sysUpTime is set to
      the value of sysUpTime.0 for the default context.

   2) If h.sessionID does not correspond to a currently
      established session with this subagent, the agentx-Response-PDU is
      sent in reply with res.error set to `notOpen'.

   3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
      supports only a default context, the agentx-Response-PDU is
      returned with res.error set to `unsupportedContext', and the
      requested operation fails.  Otherwise:  The value of res.sysUpTime
      is set to the value of sysUpTime.0 for the indicated context.

   4) If the combination of a.id and the optional a.context does not
      represent a sysORTable entry that was added by this subagent,
      during this session, the agentx-Response-PDU is returned with
      res.error set to `unknownAgentCaps'.

   5) Otherwise the master agent deletes the corresponding sysORTable
      entry and sends in reply the agentx-Response-PDU, with res.error
      set to `noError'.

7.1.9.  Processing the agentx-Close-PDU

   When the master agent receives an agentx-Close-PDU, it processes it
   as follows:

   1) An agentx-Response-PDU is created and res.sysUpTime is set to
      the value of sysUpTime.0 for the default context.





Daniele, et. al.            Standards Track                    [Page 52]

RFC 2257                        AgentX                      January 1998


   2) If h.sessionID does not correspond to a currently
      established session with this subagent, the agentx-Response-PDU is
      sent in reply with res.error set to `notOpen'.

   3) Otherwise, the master agent closes the AgentX session
      as described below.  No agentx-Response-PDU is sent.

      - All MIB regions that have been registered during this session
        are unregistered, as described in 7.1.6.

      - All index values allocated during this session are freed, as
        described in section 7.1.4.

      - All sysORID values that were registered during this session
        are removed, as described in section 7.1.8.

   The master agent does not maintain state for closed sessions.  If a
   subagent wishes to re-establish a session after receiving an agentx-
   Close-PDU, it needs to re-register MIB regions, agent capabilities,
   etc.

7.1.10.  Detecting Connection Loss

   If a master agent is able to detect (from the underlying transport)
   that a subagent cannot receive AgentX PDUs, it should close all
   affected AgentX sessions as described in 7.1.9, step 3).

7.1.11.  Processing the agentx-Notify-PDU

   A subagent sending SNMPv1 trap information must map this into
   (minimally) a value of snmpTrapOID.0, as described in 3.1.2 of RFC
   1908 [8].

   The master agent processes the agentx-Notify-PDU as follows:

   1) If h.sessionID does not correspond to a currently
         established session with this subagent, an agentx-Response-PDU
         is sent in reply with res.error set to `notOpen', and
         res.sysUpTime set to the value of sysUpTime.0 for the indicated
         context.

   2) The VarBindList is parsed.  If it does not contain a value for
         sysUpTime.0, the master agent supplies the current value of
         sysUpTime.0 for the indicated context.  If the next VarBind
         (either the first or second VarBind; see section 6.2.10.1) is
         not snmpTrapOID.0, the master agent ceases further processing
         of the notification.




Daniele, et. al.            Standards Track                    [Page 53]

RFC 2257                        AgentX                      January 1998


   3) Notifications are sent according to the implementation-specific
         configuration of the master agent.

         If SNMPv1 Trap PDUs are generated, the recommended mapping is
         as described in RFC 2089 [9].

         Except in the case of a `notOpen' error as described in (1)
         above, no agentx-Response-PDU is sent to the subagent when the
         master agent finishes processing the notification.

7.1.12.  Processing the agentx-Ping-PDU

   When the master agent receives an agentx-Ping-PDU, it processes it as
   follows:

   1) An agentx-Response-PDU is created and res.sysUpTime is set to
      the value of sysUpTime.0 for the default context.

   2) If h.sessionID does not correspond to a currently
      established session with this subagent, the agentx-Response-PDU is
      sent in reply with res.error set to `notOpen'.

   3) If the NON_DEFAULT_CONTEXT bit is set, and the master agent
      supports only a default context, the agentx-Response-PDU is
      returned with res.error set to `unsupportedContext'.  Otherwise:
      The value of res.sysUpTime is set to the value of sysUpTime.0 for
      the indicated context.

   4) The agentx-Response-PDU is sent, with res.error set to
      `noError'.

   If a subagent does not receive a response to its pings, or if it is
   able to detect (from the underlying transport) that the master agent
   is not able to receive AgentX messages, then it eventually must
   initiate a new AgentX session, re-register its regions, etc.

7.2.  Processing Received SNMP Protocol Messages

   When an SNMP GetRequest, GetNextRequest, GetBulkRequest, or
   SetRequest protocol message is received by the master agent, the
   master agent applies its access control policy.

   In particular, for SNMPv1 or SNMPv2c PDUs, the master agent applies
   the Elements of Procedure defined in section 4.1 of RFC 1157 [6] that
   apply to receiving entities.  (For other versions of SNMP, the master
   agent applies the access control policy defined in the Elements of
   Procedure for those versions.)




Daniele, et. al.            Standards Track                    [Page 54]

RFC 2257                        AgentX                      January 1998


   In the SNMPv1 or v2c frameworks, the master agent uses the community
   string as an index into a local repository of configuration
   information that may include community profiles or more complex
   context information.

   If application of the access control policy results in a valid SNMP
   request PDU, then an SNMP Response-PDU is constructed from
   information gathered in the exchange of AgentX PDUs between the
   master agent and one or more subagents.  Upon receipt and initial
   validation of an SNMP request PDU, a master agent uses the procedures
   described below to dispatch AgentX PDUs to the proper subagents,
   marshal the subagent responses, and construct an SNMP response PDU.

7.2.1.  Dispatching AgentX PDUs

   Upon receipt and initial validation of an SNMP request PDU, a master
   agent uses the procedures described below to dispatch AgentX PDUs to
   the proper subagents.

   Note: In the following procedures, an object identifier is said to be
   "contained" within an OID range when both of the following are true:

       - The object identifier does not lexicographically precede
         the range.

       - The object identifier lexicographically precedes the end
         of the range.

   General Rules of Procedure

   While processing a particular SNMP request, the master agent may send
   one or more AgentX PDUs to one or more subagents.  The following
   rules of procedure apply in general to the AgentX master agent. PDU-
   specific rules are listed in the applicable sections.

   1) Honoring the registry

      Because AgentX supports overlapping registrations, it is possible
      for the master agent to obtain a value for a requested varbind
      from within multiple registered MIB regions.

      The master agent must ensure that the value (or exception)
      actually returned in the SNMP response PDU is taken from the
      authoritative region (as defined in section 7.1.5.1).







Daniele, et. al.            Standards Track                    [Page 55]

RFC 2257                        AgentX                      January 1998


   2) GetNext and GetBulk Processing

      The master agent may choose to send agentx-Get-PDUs while
      servicing an SNMP GetNextRequest-PDU.  The master agent may choose
      to send agentx-Get-PDUs or agentx-GetNext-PDUs while servicing an
      SNMP GetBulkRequest-PDU.  One possible reason for this would be if
      the current iteration has targeted instance-level registrations.

      The master agent may choose to "scope" the possible instances
      returned by a subagent by specifying an ending OID in the
      SearchRange.  If such scoping is used, typically the ending OID
      would be the first lexicographical successor to the target OID
      range that was registered by a subagent other than the target
      subagent.  Regardless of this choice, rule (1) must be obeyed.

      The master agent may require multiple request-response iterations
      on the same subagent session, to determine the final value of all
      requested variables.

      All AgentX PDUs sent on the session while processing a given SNMP
      request must contain identical values of transactionID.  Each
      different SNMP request processed by the master agent must present
      a unique value of transactionID (within the limits of the 32-bit
      field) to the session.

   3) Number and order of variables sent per AgentX PDU

      For Get/GetNext/GetBulk operations, at any stage of the possibly
      iterative process, the master agent may need to dispatch several
      SearchRanges to a particular subagent session.  The master agent
      may send one, some, or all of the SearchRanges in a single AgentX
      PDU.

      The master agent must ensure that the correct contents and
      ordering of the VarBindList in the SNMP Response-PDU are
      maintained.

      The following rules govern the number of VarBinds in a given
      AgentX PDU:

         a) The subagent must support processing of AgentX PDUs
            with multiple VarBinds.

         b) When processing an SNMP Set request, the master agent
            must send all of the VarBinds applicable to a particular
            subagent session in a single Test/Set transaction.





Daniele, et. al.            Standards Track                    [Page 56]

RFC 2257                        AgentX                      January 1998


         c) When processing an SNMP Get, GetNext, or GetBulk request,
            the master agent may send a single AgentX PDU to the
            subagent with all applicable VarBinds, or multiple PDUs with
            single VarBinds, or something in between those extremes. The
            determination of which method to use in a particular case is
            implementation-specific.

   4) Timeout Values

      The master agent chooses a timeout value for each MIB region being
      queried, which is

         a) the value specified during registration of the MIB region,
            if it was non-zero

         b) otherwise, the value specified during establishment of
            the session in which this region was subsequently
            registered, if that value was non-zero.

         c) otherwise, the master agent's default value

      When an AgentX PDU that references multiple MIB regions is
      dispatched, the timeout value used for the PDU is the maximum
      value of the timeouts so determined for each of the referenced MIB
      regions.

   5) Context

      If the master agent has determined that a specific non-default
      context is associated with the SNMP request PDU, that context is
      encoded into the AgentX PDU's context field and the
      NON_DEFAULT_CONTEXT bit is set in h.flags.

      Otherwise, no context Octet String is added to the PDU, and the
      NON_DEFAULT_CONTEXT bit is cleared.

7.2.1.1.  agentx-Get-PDU

   Each variable binding in the SNMP request PDU is processed as
   follows:

   (1) Identify the target OID range.

       Within a lexicographically ordered set of OID ranges, valid for
       the indicated context, locate the authoritative region that
       contains the binding's name.





Daniele, et. al.            Standards Track                    [Page 57]

RFC 2257                        AgentX                      January 1998


   (2) If no such OID range exists, the variable binding is not
       processed further, and its value is set to `noSuchObject'.

   (3) Identify the subagent session in which this region was
       registered, termed the target session.

   (4) If this is the first variable binding to be dispatched over
       the target session in a request-response exchange entailed in the
       processing of this management request:

       - Create an agentx-Get-PDU for this session, with the header
         fields initialized as described above (see 6.1 AgentX PDU
         Header).

   (5) Add a SearchRange to the end of the target session's PDU
       for this variable binding.

       - The variable binding's name is encoded into the starting OID.

       - The ending OID is encoded as null.

7.2.1.2.  agentx-GetNext-PDU

   Each variable binding in the SNMP request PDU is processed as
   follows:

   (1) Identify the target OID range.

       Within a lexicographically ordered set of OID ranges, valid for
       the indicated context, locate

        a) the authoritative OID range that contains the variable
           binding's name and is not a fully qualified instance, or

        b) the authoritative OID range that is the first
           lexicographical successor to the variable binding's name.

   (2) If no such OID range exists, the variable binding is not
       processed further, and its value is set to `endOfMibView'.

   (3) Identify the subagent session in which this region was
       registered, termed the target session.

   (4) If this is the first variable binding to be dispatched over the
       target session in a request-response exchange entailed in the
       processing of this management request:





Daniele, et. al.            Standards Track                    [Page 58]

RFC 2257                        AgentX                      January 1998


       - Create an agentx-GetNext-PDU for the session, with
         the header fields initialized as described above (see 6.1
         AgentX PDU Header).

   (5) Add a SearchRange to the end of the target session's
       agentx-GetNext-PDU for this variable binding.

        - if (1a) applies, the variable binding's name is encoded
          into the starting OID, and the OID's "include" field is set to
          0.

        - if (1b) applies, the target OID is encoded into the starting
          OID, and its "include" field is set to 1.

7.2.1.3.  agentx-GetBulk-PDU

   (Note: The outline of the following procedure is based closely on
   section 4.2.3, "The GetBulkRequest-PDU" of RFC 1905 [4].  Please
   refer to it for details on the format of the SNMP GetBulkRequest-PDU
   itself.)

   Each variable binding in the request PDU is processed as follows:

   (1) Identify the authoritative target OID range and target session,
       exactly as described for the agentx-GetNext-PDU (see 7.2.1.2).

   (2) If this is the first variable binding to be dispatched over the
       target session in a request-response exchange entailed in the
       processing of this management request:

       - Create an agentx-GetBulk-PDU for the session, with
         the header fields initialized as described above (see 6.1
         AgentX PDU Header).

   (3) Add a SearchRange to the end of the target session's
       agentx-GetBulk-PDU for this variable binding, as described for
       the agentx-GetNext-PDU.  If the variable binding was a non-
       repeater in the original request PDU, it must be a non-repeater
       in the agentx-GetBulk-PDU.

   The value of g.max_repetitions in the agentx-GetBulk-PDU may be less
   than (but not greater than) the value in the original request PDU.

   The master agent may make such alterations due to simple sanity
   checking, optimizations for the current iteration based on the
   registry, the maximum possible size of a potential Response-PDU,
   known constraints of the AgentX transport, or any other
   implementation-specific constraint.



Daniele, et. al.            Standards Track                    [Page 59]

RFC 2257                        AgentX                      January 1998


7.2.1.4.  agentx-TestSet-PDU

   AgentX employs test-commit-undo-cleanup phases to achieve "as if
   simultaneous" semantics of the SNMP SetRequest-PDU within the
   extensible agent.  The initial phase involves the agentx-TestSet-PDU.

   Each variable binding in the SNMP request PDU is processed in order,
   as follows:

   (1) Identify the target OID range.

       Within a lexicographically ordered set of OID ranges, valid for
       the indicated context, locate the authoritative range that
       contains the variable binding's name.

   (2) If no such OID range exists, this variable binding fails with an
       error of `notWritable'.  Processing is complete for this request.

   (3) Identify the single subagent responsible for this OID range,
       termed the target subagent, and the applicable session, termed
       the target session.

   (4) If this is the first variable binding to be dispatched over
       the target session in a request-response exchange entailed in the
       processing of this management request:

       - create an agentx-TestSet-PDU for the session, with the
         header fields initialized as described above (see 6.1 AgentX
         PDU Header).

   (5) Add a VarBind to the end of the target session's PDU
       for this variable binding, as described in section 5.4.

    Note that all VarBinds applicable to a given session must be sent in
    a single agentx-TestSet-PDU.

7.2.1.5.  Dispatch

   A timeout value is calculated for each PDU to be sent, which is the
   maximum value of the timeouts determined for each of the PDU's
   SearchRanges (as described above in 7.2.1 Dispatching AgentX PDUs,
   item 4). Each pending PDU is mapped (via its h.sessionID value) to a
   particular transport domain/endpoint, as described in section 8
   (Transport Mappings).







Daniele, et. al.            Standards Track                    [Page 60]

RFC 2257                        AgentX                      January 1998


7.2.2.  Subagent Processing of agentx-Get, GetNext, GetBulk-PDUs

   A conformant AgentX subagent must support the agentx-Get, -GetNext,
   and -GetBulk PDUs, and must support multiple variables being supplied
   in each PDU.

   When a subagent receives an agentx-Get-, GetNext-, or GetBulk-PDU, it
   performs the indicated management operations and returns an agentx-
   Response-PDU.

   The agentx-Response-PDU header fields are identical to the received
   request PDU except that, at the start of processing, the subagent
   initializes h.type to Response, res.error to `noError', res.index to
   0, and the VarBindList to null.

   Each SearchRange in the request PDU's SearchRangeList is processed as
   described below, and a VarBind is added in the corresponding location
   of the agentx-Response-PDU's  VarbindList.  If processing should fail
   for any reason not described below, res.error is set to `genErr',
   res.index to the index of the failed SearchRange, the VarBindList is
   reset to null, and this agentx-Response-PDU is returned to the master
   agent.

7.2.2.1.  Subagent Processing of the agentx-Get-PDU

   Upon the subagent's receipt of an agentx-Get-PDU, each SearchRange in
   the request is processed as follows:

   (1) The starting OID is copied to v.name.

   (2) If the starting OID exactly matches the name of a
       variable instantiated by this subagent within the indicated
       context and session, v.type and v.data are encoded to represent
       the variable's syntax and value, as described in section 5.4,
       Value Representation.

   (3) Otherwise, if the starting OID does not match the object
       identifier prefix of any variable instantiated within the
       indicated context and session, the VarBind is set to
       `noSuchObject', in the manner described in section 5.4, Value
       Representation.

   (4) Otherwise, the VarBind is set to `noSuchInstance'
       in the manner described in section 5.4, Value Representation.







Daniele, et. al.            Standards Track                    [Page 61]

RFC 2257                        AgentX                      January 1998


7.2.2.2.  Subagent Processing of the agentx-GetNext-PDU

   Upon the subagent's receipt of an agentx-GetNext-PDU, each
   SearchRange in the request is processed as follows:

   (1) The subagent searches for a variable within the
       lexicographically ordered list of variable names for all
       variables it instantiates (without regard to registration of
       regions) within the indicated context and session, for which the
       following are all true:

       - if the "include" field of the starting OID is 0, the
         variable's name is the closest lexicographical successor to the
         starting OID.

       - if the "include" field of the starting OID is 1, the
         variable's name is either equal to, or the closest
         lexicographical successor to, the starting OID.

       - If the ending OID is not null, the variable's name
         lexicographically precedes the ending OID.

       If all of these conditions are met, v.name is set to the located
       variable's name.  v.type and v.data are encoded to represent the
       variable's syntax and value, as described in section 5.4, Value
       Representation.

   (2) If no such variable exists, v.name is set to the starting OID,
       and the VarBind is set to `endOfMibView', in the manner described
       in section 5.4, Value Representation.

7.2.2.3.  Subagent Processing of the agentx-GetBulk-PDU

   A maximum of N + (M * R) VarBinds are returned, where

      N equals g.non_repeaters,
      M equals g.max_repetitions, and
      R is (number of SearchRanges in the GetBulk request) - N.

   The first N SearchRanges are processed exactly as for the agentx-
   GetNext-PDU.

   If M and R are both non-zero, the remaining R SearchRanges are
   processed iteratively to produce potentially many VarBinds.  For each
   iteration i, such that i is greater than zero and less than or equal
   to M, and for each repeated SearchRange s, such that s is greater
   than zero and less than or equal to R, the (N+((i-1)*R)+s)-th VarBind
   is added to the agentx-Response-PDU as follows:



Daniele, et. al.            Standards Track                    [Page 62]

RFC 2257                        AgentX                      January 1998


      1) The subagent searches for a variable within the
         lexicographically ordered list of variable names for all
         variables it instantiates (without regard to registration of
         regions) within the indicated context and session, for which
         the following are all true:

          - The variable's name is the (i)-th lexicographical successor
            to the (N+s)-th requested OID.

            (Note that if i is 0 and the "include" field is 1, the
            variable's name may be equivalent to, or the first
            lexicographical successor to, the (N+s)-th requested OID.)

          - If the ending OID is not null, the variable's name
            lexicographically precedes the ending OID.

         If all of these conditions are met, v.name is set to the
         located variable's name.  v.type and v.data are encoded to
         represent the variable's syntax and value, as described in
         section 5.4, Value Representation.

      2) If no such variable exists, the VarBind is set to
         `endOfMibView' as described in section 5.4, Value
         Representation.  v.name is set to v.name of the (N+((i-
         2)*R)+s)-th VarBind unless i is currently 1, in which case it
         is set to the value of the starting OID in the (N+s)-th
         SearchRange.

   Note that further iterative processing should stop if

        - For any iteration i, all s values of v.type are
          `endOfMibView'.

        - An AgentX transport constraint or other
          implementation-specific constraint is reached.

7.2.3.  Subagent Processing of agentx-TestSet, -CommitSet, -UndoSet,
                  -CleanupSet-PDUs

   A conformant AgentX subagent must support the agentx-TestSet,
   -CommitSet, -UndoSet, and -CleanupSet PDUs, and must support multiple
   variables being supplied in each PDU.

   These four PDUs are used to collectively perform the indicated
   management operation.  An agentx-Response-PDU is sent in reply to
   each of the PDUs, to inform the master agent of the state of the
   operation.




Daniele, et. al.            Standards Track                    [Page 63]

RFC 2257                        AgentX                      January 1998


   The agentx-Response-PDU header fields are identical to the received
   request PDU except that, at the start of processing, the subagent
   initializes h.type to Response, res.error to `noError', and res.index
   to 0.

   These Response-PDUs do not contain a VarBindList.

7.2.3.1.  Subagent Processing of the agentx-TestSet-PDU

   Upon the subagent's receipt of an agentx-TestSet-PDU, each VarBind in
   the PDU is validated until they are all successful, or until one
   fails, as described in section 4.2.5 of RFC 1905 [4]. The subagent
   validates variables with respect to the context and session indicated
   in the testSet-PDU.

   If each VarBind is successful, the subagent has a further
   responsibility to ensure the availability of all resources (memory,
   write access, etc.) required for successfully carrying out a
   subsequent agentx-CommitSet operation.  If this cannot be guaranteed,
   the subagent should set res.error to `resourceUnavailable'.

   As a result of this validation step, an agentx-Response-PDU is sent
   in reply whose res.error field is set to one of the following (SNMPv2
   SMI) values:

            noError                    (0),
            genErr                     (5),
            noAccess                   (6),
            wrongType                  (7),
            wrongLength                (8),
            wrongEncoding              (9),
            wrongValue                (10),
            noCreation                (11),
            inconsistentValue         (12),
            resourceUnavailable       (13),
            notWritable               (17),
            inconsistentName          (18)

   If this value is not `noError', the res.index field must be set to
   the index of the VarBind for which validation failed.

   Implementation of rigorous validation code may be one of the most
   demanding aspects of subagent development.  Implementors are strongly
   encouraged to do this right, so as to avoid if at all possible the
   extensible agent's having to return `commitFailed' or `undoFailed'
   during subsequent processing.





Daniele, et. al.            Standards Track                    [Page 64]

RFC 2257                        AgentX                      January 1998


7.2.3.2.  Subagent Processing of the agentx-CommitSet-PDU

   The agentx-CommitSet-PDU indicates that the subagent should actually
   perform (as described in the post-validation sections of 4.2.5 of RFC
   1905 [4]) the management operation indicated by the previous
   TestSet-PDU.  After carrying out the management operation, the
   subagent sends in reply an agentx-Response-PDU whose res.error field
   is set to one of the following (SNMPv2 SMI) values:

            noError                    (0),
            commitFailed              (14)

   If this value is `commitFailed', the res.index field must be set to
   the index of the VarBind for which the operation failed.  Otherwise
   res.index is set to 0.

7.2.3.3.  Subagent Processing of the agentx-UndoSet-PDU

   The agentx-UndoSet-PDU indicates that the subagent should undo the
   management operation requested in a preceding CommitSet-PDU.  The
   undo process is as described in section 4.2.5 of RFC 1905 [4].

   After carrying out the undo process, the subagent sends in reply an
   agentx-Response-PDU whose res.index field is set to 0, and whose
   res.error field is set to one of the following (SNMPv2 SMI) values:

            noError                    (0),
            undoFailed                (15)

   If this value is `undoFailed', the res.index field must be set to the
   index of the VarBind for which the operation failed.  Otherwise
   res.index is set to 0.

   This PDU also signals the end of processing of the management
   operation initiated by the previous TestSet-PDU.  The subagent should
   release resources, etc. as described in section 7.2.3.4.

7.2.3.4.  Subagent Processing of the agentx-CleanupSet-PDU

   The agentx-CleanupSet-PDU signals the end of processing of the
   management operation requested in the previous TestSet-PDU.  This is
   an indication to the subagent that it may now release any resources
   it may have reserved in order to carry out the management request.

   No response is sent by the subagent.






Daniele, et. al.            Standards Track                    [Page 65]

RFC 2257                        AgentX                      January 1998


7.2.4.  Master Agent Processing of AgentX Responses

   The master agent now marshals all subagent AgentX response PDUs and
   builds an SNMP response PDU.  In the next several subsections, the
   initial processing of all subagent AgentX response PDUs is described,
   followed by descriptions of subsequent processing for each specific
   subagent Response.

7.2.4.1.  Common Processing of All AgentX Response PDUs

   1) If a subagent does not respond within the timeout interval for
      this dispatch, it is treated as if the subagent had returned
      `genErr' and processed as described below.

      A timeout may be due to a variety of reasons, and does not
      necessarily denote a failed or malfunctioning subagent.  As such,
      the master agent's response to a subagent timeout is
      implementation-specific, but with the following constraint:

         A subagent that times out on three consecutive requests is
         considered unable to respond, and the master agent must close
         the AgentX session as described in 7.1.9, step (2).

   2) Otherwise, the h.packetID, h.sessionID, and h.transactionID
      fields of the AgentX response PDU are used to correlate subagent
      responses.  If the response does not pertain to this SNMP
      operation, it is ignored.

   3) Otherwise, the responses are processed jointly to form the SNMP
      response PDU.

7.2.4.2.  Processing of Responses to agentx-Get-PDUs

   After common processing of the subagent's response to an agentx-Get-
   PDU (see 7.2.4.1 above), processing continues with the following
   steps:

   1)  For any received AgentX response PDU, if res.error is not
       `noError', the SNMP response PDU's error code is set to this
       value, and its error index to the index of the variable binding
       corresponding to the failed VarBind in the subagent's AgentX
       response PDU.

       All other AgentX response PDUs received due to processing this
       SNMP request are ignored.  Processing is complete; the SNMP
       Response PDU is ready to be sent (see section 7.2.5, Sending the
       SNMP Response-PDU).




Daniele, et. al.            Standards Track                    [Page 66]

RFC 2257                        AgentX                      January 1998


   2)  Otherwise, the content of each VarBind in the AgentX response PDU
       is used to update the corresponding variable binding in the SNMP
       Response-PDU.

7.2.4.3.  Processing of Responses to agentx-GetNext-PDU and
                 agentx-GetBulk-PDU

   After common processing of the subagent's response to an agentx-
   GetNext-PDU or agentx-GetBulk-PDU (see 7.2.4.1 above), processing
   continues with the following steps:

   1)  For any received AgentX response PDU, if res.error is not
       `noError', the SNMP response PDU's error code is set to this
       value, and its error index to the index of the VarBind
       corresponding to the failed VarBind in the subagent's AgentX
       response PDU.

       All other AgentX response PDUs received due to processing this
       SNMP request are ignored.  Processing is complete; the SNMP
       response PDU is ready to be sent (see section 7.2.5, Sending the
       SNMP Response PDU).

   2)  Otherwise, the content of each VarBind in the AgentX response
       PDU is used to update the corresponding VarBind in the SNMP
       response PDU.

   After all expected AgentX response PDUs have been processed, if any
   VarBinds still contain the value `endOfMibView' in their v.type
   fields, processing must continue:

   3)  A new iteration of AgentX request dispatching is initiated
       (as described in section 7.2.1.1), in which only those VarBinds
       whose v.type is `endOfMibView' are processed.

   4)  For each such VarBind, a target OID range is identified
       which is the lexicographical successor to the target OID range
       for this VarBind on the last iteration.  The target subagent is
       the one that registered the target OID range.  The target session
       is the one in which the target OID range was registered.

       If an agentx-GetNext- or GetBulk-PDU is being dispatched, the
       starting OID in the SearchRanges is set to the target OID range,
       and its "include" field is set to 1.

   5)  The value of transactionID must be identical to the value
       used during the previous iteration.





Daniele, et. al.            Standards Track                    [Page 67]

RFC 2257                        AgentX                      January 1998


   6)  The AgentX PDUs are sent to the subagent(s), and the responses
       are received and processed according to the steps described in
       section 7.2.4.

   7)  This process continues iteratively until a complete SNMP
       Response-PDU has been built, or until there remain no target OID
       range lexicographical successors.

7.2.4.4.  Processing of Responses to agentx-TestSet-PDUs

   After common processing of the subagent's response to an agentx-
   TestSet-PDU (see 7.2.4.1 above), processing continues with the
   further exchange of AgentX PDUs.  The value of h.transactionID in the
   agentx-CommitSet, -UndoSet, and -CleanupSet-PDUs must be identical to
   the value sent in the testSet-PDU.

   The state transitions and PDU sequences are depicted in section 7.3.

   1)  If any target subagent's response is not `noError', all other
       agentx-Response-PDUs received due to processing this SNMP request
       are ignored.

       An agentx-CleanupSet-PDU is sent to each target subagent that has
       been sent a agentx-TestSet-PDU.

       Processing is complete; the SNMP response PDU is constructed as
       described below in 7.2.4.6.

   2)  Otherwise an agentx-CommitSet-PDU is sent to each target
       subagent.

7.2.4.5.  Processing of Responses to agentx-CommitSet-PDUs

   After common processing of the subagent's response to an agentx-
   CommitSet-PDU (see 7.2.4.1 above), processing continues with the
   following steps:

   1)  If any response is not `noError', all other
       agentx-Response-PDUs received due to processing this SNMP request
       are ignored.

       An agentx-UndoSet-PDU is sent to each target subagent that has
       been sent a agentx-CommitSet-PDU.  All other subagents are sent a
       agentx-CleanupSet-PDU.

   2)  Otherwise an agentx-CleanupSet-PDU is sent to each target
       subagent.  Processing is complete; the SNMP response PDU is
       constructed as described below in 7.2.4.6.



Daniele, et. al.            Standards Track                    [Page 68]

RFC 2257                        AgentX                      January 1998


7.2.4.6.  Processing of Responses to agentx-UndoSet-PDUs

   After common processing of the subagent's response to an agentx-
   UndoSet-PDU (see 7.2.4.1 above), processing continues with the
   following steps:

   1)  If any response is not `noError' the SNMP response
       PDU's error code is set to this value, and its error index to the
       index of the VarBind corresponding to the failed VarBind in the
       agentx-TestSet-PDU.

       Otherwise the SNMP response PDU's error code is set to `noError'
       and its error index to 0.

7.2.5.  Sending the SNMP Response-PDU

   Once the processing described in sections 7.2.1 - 7.2.4 is complete,
   there is an SNMP response PDU available.  The master agent now
   implements the Elements of Procedure for the applicable version of
   the SNMP protocol in order to encapsulate the PDU into a message, and
   transmit it to the originator of the SNMP management request.  Note
   that this may involve altering the PDU contents (for instance, to
   replace the original VarBinds if an error condition is to be
   returned).

   The response PDU may also be altered in order to support the SNMP
   version 1 framework.  In such cases the required mapping is that
   defined in RFC 2089 [9].  (Note in particular that the rules for
   handling Counter64 syntax may require re-sending AgentX GetBulk or
   GetNext PDUs until a VarBind of suitable syntax is returned.)

7.2.6.  MIB Views

   AgentX subagents are not aware of MIB views, since view information
   is not contained in AgentX PDUs.

   As stated above, the descriptions of procedures in section 7 of this
   memo are not intended to constrain the internal architecture of any
   conformant implementation.  In particular, the master agent
   procedures described in sections 7.2.1 and 7.2.4 may be altered so as
   to optimize AgentX exchanges when implementing MIB views.

   Such optimizations are beyond the scope of this memo.  But note that
   section 7.2.3 defines subagent behavior in such a way that alteration
   of SearchRanges may be used in such optimizations.






Daniele, et. al.            Standards Track                    [Page 69]

RFC 2257                        AgentX                      January 1998


7.3.  State Transitions

   State diagrams are presented from the master agent's perspective for
   transport connection and session establishment, and from the
   subagent's perspective for Set transaction processing.

7.3.1.  Set Transaction States

   The following table presents, from the subagent's perspective, the
   state transitions involved in Set transaction processing:

                                       STATE
            +----------------+--------------+---------+--------+--------
            |       A        |      B       |   C     |   D    |   E
            |   (Initial     |    TestOK    | Commit  | Test   | Commit
            |     State)     |              |  OK     | Fail   |  Fail
            |                |              |         |        |
    EVENT   |                |              |         |        |
   ---------+----------------+--------------+---------+--------+--------
            | 7.2.3.1        |              |         |        |
   Receive  | All varbinds   |              |         |        |
   TestSet  | OK?            |      X       |    X    |   X    |    X
   PDU      |   Yes ->B      |              |         |        |
            |   No  ->D      |              |         |        |
   ---------+----------------+--------------+---------+--------+--------
            |                |  7.2.3.2     |         |        |
   Receive  |                |  NoError?    |         |        |
   Commit-  |       X        |   Yes ->C    |    X    |   X    |    X
   Set PDU  |                |   No  ->E    |         |        |
   ---------+----------------+--------------+---------+--------+--------
   Receive  |                |              | 7.2.3.3 |        |7.2.4.5
   UndoSet  |       X        |       X      | ->done  |   X    | ->done
   PDU      |                |              |         |        |
   ---------+----------------+--------------+---------+--------+--------
   Receive  |                |  7.2.4.4     | 7.2.3.4 |7.2.4.4 |
   Cleanup- |       X        |   ->done     | ->done  | ->done |   X
   Set PDU  |                |              |         |        |
   ---------+----------------+--------------+---------+--------+--------
   Session  |                | rollback     | undo    |        |
   Loss     |  ->done        |  ->done      |  ->done | ->done | ->done
   ---------+----------------+--------------+---------+--------+--------

   There are three possible sequences that a subagent may follow for a
   particular set transaction:

      1) TestSet CommitSet CleanupSet
      2) TestSet CommitSet UndoSet
      3) TestSet           CleanupSet



Daniele, et. al.            Standards Track                    [Page 70]

RFC 2257                        AgentX                      January 1998


   Note that a single PDU sequence may result in multiple paths through
   the finite state machine (FSM).  For example, the sequence

      TestSet CommitSet UndoSet

   may walk through either of these two state sequences:

      (initial) TestOK CommitOK   (done)
      (initial) TestOK CommitFail (done)

7.3.2  Transport Connection States

   The following table presents, from the master agent's perspective,
   the state transitions involved in transport connection setup and
   teardown:




































Daniele, et. al.            Standards Track                    [Page 71]

RFC 2257                        AgentX                      January 1998


                                STATE
                   +--------------+--------------
                   |      A       |      B
                   | No transport |  Transport
                   |              |  connected
                   |              |
   EVENT           |              |
   ----------------+--------------+--------------
   Transport       |              |
   connect         |     ->B      |      X
   indication      |              |
   ----------------+--------------+--------------
   Receive         |              | if duplicate
   Open-PDU        |              | session id,
                   |              | reject, else
                   |      X       | establish
                   |              | session
                   |              |
                   |              |     ->B
   ----------------+--------------+--------------
   Receive         |              | if matching
   Response-PDU    |              | session id,
                   |              | feed to that
                   |      X       | session's FSM
                   |              | else ignore
                   |              |
                   |              |     ->B
   ----------------+--------------+--------------
   Receive other   |              | if matching
   PDUs            |              | session id,
                   |              | feed to that
                   |      X       | session's FSM
                   |              | else reject
                   |              |
                   |              |     ->B
   ----------------+--------------+--------------
   Transport       |              |notify all
   disconnect      |              |sessions on
   indication      |      X       |this transport
                   |              |
                   |              |     ->A
   ----------------+--------------+--------------









Daniele, et. al.            Standards Track                    [Page 72]

RFC 2257                        AgentX                      January 1998


7.3.3  Session States

   The following table presents, from the master agent's perspective,
   the state transitions involved in session setup and teardown:

                              STATE
                  +-------------+----------------
                  |     A       |      B
                  |  No session |  Session
                  |             |  established
   EVENT          |             |
   ---------------+-------------+----------------
                  |  7.1.1      |
   Receive        |             |      X
   Open PDU       |    ->B      |
   ---------------+-------------+----------------
                  |             |  7.1.9
   Receive        |      X      |
   Close PDU      |             |    ->A
   ---------------+-------------+----------------
   Receive        |             |  7.1.5
   Register PDU   |      X      |
                  |             |    ->B
   ---------------+-------------+----------------
   Receive        |             |  7.1.6
   Unregister     |      X      |
   PDU            |             |    ->B
   ---------------+-------------+----------------
   Receive        |             |
   Get PDU        |             |
   GetNext PDU    |             |
   GetBulk PDU    |      X      |       X
   TestSet PDU    |             |
   CommitSet PDU  |             |
   UndoSet PDU    |             |
   CleanupSet PDU |             |
   ---------------+-------------+----------------
   Receive        |             |  7.1.11
   Notify PDU     |      X      |
                  |             |    ->B
   ---------------+-------------+----------------
   Receive Ping   |             |  7.1.12
   PDU            |      X      |
                  |             |    ->B
   ---------------+-------------+----------------
   (continued next page)





Daniele, et. al.            Standards Track                    [Page 73]

RFC 2257                        AgentX                      January 1998


   ---------------+-------------+----------------
   Receive        |             |  7.1.2
   IndexAllocate  |      X      |
   PDU            |             |    ->B
   ---------------+-------------+----------------
   Receive        |             |  7.1.4
   IndexDeallocate|      X      |
   PDU            |             |    ->B
   ---------------+-------------+----------------
   Receive        |             |  7.1.7
   AddAgentxCaps  |      X      |
   PDU            |             |    ->B
   ---------------+-------------+----------------
   Receive        |             |  7.1.8
   RemoveAgentxCap|      X      |
   PDU            |             |    ->B
   ---------------+-------------+----------------
   Receive        |             |  7.2.4
   Response PDU   |      X      |
                  |             |    ->B
   ---------------+-------------+----------------
   Receive        |             |
   Other PDU      |      X      |       X
   ---------------+-------------+----------------

8.  Transport Mappings

   The same AgentX PDU formats, encodings, and elements of procedure are
   used regardless of the underlying transport.

8.1.  AgentX over TCP

8.1.1.  Well-known Values

   The master agent accepts TCP connection requests for the well-known
   port 705.  Subagents connect to the master agent using this port
   number.

8.1.2.  Operation

   Once a TCP connection has been established, the AgentX peers use this
   connection to carry all AgentX PDUs. Multiple AgentX sessions may be
   established using the same TCP connection.  AgentX PDUs are sent
   within an AgentX session.  AgentX peers are responsible for mapping
   the h.sessionID to a particular TCP connection.

   All AgentX PDUs are presented individually to the TCP, to be sent as
   the data portion of a TCP PDU.



Daniele, et. al.            Standards Track                    [Page 74]

RFC 2257                        AgentX                      January 1998


8.2.  AgentX over UNIX-domain Sockets

   Many (BSD-derived) implementations of the UNIX operating system
   support the UNIX pathname address family (AF_UNIX) for socket
   communications.  This provides a convenient method of sending and
   receiving data between processes on the same host.

   Mapping AgentX to this transport is useful for environments that

       - wish to guarantee subagents are running on the same
         managed node as the master agent, and where

       - sockets provide better performance than TCP or UDP,
         especially in the presence of heavy network I/O

8.2.1.  Well-known Values

   The master agent creates a well-known UNIX-domain socket endpoint
   called "/var/agentx/master".  (It may create other, implementation-
   specific endpoints.)

   This endpoint name uses the character set encoding native to the
   managed node, and represents a UNIX-domain stream (SOCK_STREAM)
   socket.

8.2.2.  Operation

   Once a connection has been established, the AgentX peers use this
   connection to carry all AgentX PDUs.

   Multiple AgentX sessions may be established using the same
   connection.  AgentX PDUs are sent within an AgentX session.  AgentX
   peers are responsible for mapping the h.sessionID to a particular
   connection.

   All AgentX PDUs are presented individually to the socket layer, to be
   sent in the data stream.


9.  Security Considerations

   This memo defines a protocol between two processing entities, one of
   which (the master agent) is assumed to perform authentication of
   received SNMP requests and to control access to management
   information.  The master agent performs these security operations
   independently of the other processing entity (the subagent).





Daniele, et. al.            Standards Track                    [Page 75]

RFC 2257                        AgentX                      January 1998


   Security considerations require three questions to be answered:

      1. Is a particular subagent allowed to initiate a session with a
         particular master agent?

      2. During an AgentX session, is any SNMP security-related
         information (for example, community names) passed from the
         master agent to the subagent?

      3. During an AgentX session, what part of the MIB tree is this
         subagent allowed to register?

   The answer to the third question is: A subagent can register any
   subtree (subject to AgentX elements of procedure, section 7.1.5).
   Currently there is no access control mechanism defined in AgentX. A
   concern here is that a malicious subagent that registers an
   unauthorized "sensitive" subtree, could see modification requests to
   those objects, or by giving its own clever answer to NMS queries,
   could cause the NMS to do something that leads to information
   disclosure or other damage.

   The answer to the second question is: No.

   Now we can answer the first question.  AgentX does not contain a
   mechanism for authorizing/refusing session initiations.  Thus,
   controlling subagent access to the master agent may only be done at a
   lower layer (e.g., transport).

   An AgentX subagent can connect to a master agent using either a
   network transport mechanism (e.g., TCP), or a "local" mechanism
   (e.g., shared memory, named pipes).

   In the case where a local transport mechanism is used and both
   subagent and master agent are running on the same host, connection
   authorization can be delegated to the operating system features.  The
   answer to the first security question then becomes: "If and only if
   the subagent has sufficient privileges, then the operating system
   will allow the connection".

   If a network transport is used, currently there is no inherent
   security.  Transport Layer Security or SSL could be used to control
   subagent connections, but that is beyond the scope of this document.

   Thus it is recommended that subagents always run on the same host as
   the master agent and that operating system features be used to ensure
   that only properly authorized subagents can establish connections to
   the master agent.




Daniele, et. al.            Standards Track                    [Page 76]

RFC 2257                        AgentX                      January 1998


10.  Acknowledgements

   The initial development of this memo was heavily influenced by the
   DPI 2.0 specification RFC 1592 [7].

   This document was produced by the IETF Agent Extensibility (AgentX)
   Working Group, and benefited especially from the contributions of the
   following working group members:

      David Battle, Uri Blumenthal, Jeff Case, Maria Greene, Dave
      Keeney, Harmen van der Linde, Bob Natale, Randy Presuhn, Aleksey
      Romanov, Don Ryan, and Juergen Schoenwaelder.

   The AgentX Working Group is chaired by:

   Bob Natale
   ACE*COMM Corporation
   704 Quince Orchard Road
   Gaithersburg MD  20878

   Phone: +1-301-721-3000
   Fax:   +1-301-721-3001
   EMail: bnatale@acecomm.com

11.  Authors' and Editor's Addresses

   Mike Daniele
   Digital Equipment Corporation
   110 Spit Brook Rd
   Nashua, NH 03062

   Phone: +1-603-881-1423
   EMail: daniele@zk3.dec.com


   Bert Wijnen
   IBM Professional Services
   Watsonweg 2
   1423 ND Uithoorn
   The Netherlands

   Phone: +31-79-322-8316
   EMail: wijnen@vnet.ibm.com








Daniele, et. al.            Standards Track                    [Page 77]

RFC 2257                        AgentX                      January 1998


   Dale Francisco (editor)
   Cisco Systems
   150 Castilian Dr
   Goleta CA 93117

   Phone: +1-805-961-3642
   Fax:   +1-805-961-3600
   EMail: dfrancis@cisco.com

12.  References

[1]  Information processing systems - Open Systems Interconnection -
     Specification of Abstract Syntax Notation One (ASN.1),
     International Organization for Standardization.  International
     Standard 8824, (December, 1987).

[2]  Case, J., McCloghrie, K., Rose, M. and S. Waldbusser,
     "Structure of Management Information for Version 2 of the Simple
     Network Management Protocol (SNMPv2)", RFC 1902, January 1996.

[3]  Case, J., McCloghrie, K., Rose, M. and S. Waldbusser,
     "Textual Conventions for Version 2 of the Simple Network Management
     Protocol (SNMPv2)", RFC 1903, January 1996.

[4]  Case, J., McCloghrie, K., Rose, M., and S. Waldbusser,
     "Protocol Operations for Version 2 of the Simple Network Management
     Protocol (SNMPv2)", RFC 1905, January 1996.

[5]  Case, J., McCloghrie, K., Rose, M. and S. Waldbusser,
     "Management Information Base for Version 2 of the Simple Network
     Management Protocol (SNMPv2)", RFC 1907, January 1996.

[6]  Case, J., Fedor, M., Schoffstall, M., and J. Davin, "Simple Network
     Management Protocol", STD 15, RFC 1157, SNMP Research, Performance
     Systems International, MIT Laboratory for Computer Science, May
     1990.

[7]  Wijnen, B., Carpenter, G., Curran, K., Sehgal, A. and G. Waters,
     "Simple Network Management Protocol: Distributed Protocol
     Interface, Version 2.0", RFC 1592, March 1994.

[8]  Case, J., McCloghrie, K., Rose, M. and S. Waldbusser,
     "Coexistence between Version 1 and Version 2 of the Internet-
     standard Network Management Framework", RFC 1908, January 1996.

[9]  Wijnen, B. and D. Levi, "V2ToV1: Mapping SNMPv2 onto SNMPv1
     Within a Bilingual SNMP Agent", RFC 2089, January 1997.




Daniele, et. al.            Standards Track                    [Page 78]

RFC 2257                        AgentX                      January 1998


[10] Case, J., McCloghrie, K., Rose, M. and S. Waldbusser,
     "Conformance Statements for Version 2 of the Simple Network
     Management Protocol (SNMPv2)", RFC 1904, January 1996.

[11] McCloghrie, K. and F. Kastenholz, "Evolution of the
     Interfaces Group of MIB-II", RFC 1573, January 1994.

[12] Case, J., "FDDI Management Information Base", RFC 1285,
     January 1992.

[13] Application MIB Working Group, Krupczak, C., and J. Saperia,
     "Definitions of System-Level Managed Objects for Applications",
     draft-ietf-applmib-sysapplmib-08.txt, 15 Apr 1997.






































Daniele, et. al.            Standards Track                    [Page 79]

RFC 2257                        AgentX                      January 1998


13.  Full Copyright Statement

   Copyright (C) The Internet Society (1998).  All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
























Daniele, et. al.            Standards Track                    [Page 80]