• Home
  • Raw
  • Download

Lines Matching refs:tlv

769   struct snmp_asn1_tlv tlv;  in snmp_parse_inbound_frame()  local
781 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
782 IF_PARSE_ASSERT((tlv.type == SNMP_ASN1_TYPE_SEQUENCE) && (tlv.value_len == pbuf_stream.length)); in snmp_parse_inbound_frame()
783 parent_tlv_value_len = tlv.value_len; in snmp_parse_inbound_frame()
786 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
787 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_INTEGER); in snmp_parse_inbound_frame()
788 parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_parse_inbound_frame()
791 IF_PARSE_EXEC(snmp_asn1_dec_s32t(&pbuf_stream, tlv.value_len, &s32_value)); in snmp_parse_inbound_frame()
821 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
822 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_SEQUENCE); in snmp_parse_inbound_frame()
823 parent_tlv_value_len -= SNMP_ASN1_TLV_HDR_LENGTH(tlv); in snmp_parse_inbound_frame()
827 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
828 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_INTEGER); in snmp_parse_inbound_frame()
829 parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_parse_inbound_frame()
832 IF_PARSE_EXEC(snmp_asn1_dec_s32t(&pbuf_stream, tlv.value_len, &s32_value)); in snmp_parse_inbound_frame()
836 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
837 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_INTEGER); in snmp_parse_inbound_frame()
838 parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_parse_inbound_frame()
841 IF_PARSE_EXEC(snmp_asn1_dec_s32t(&pbuf_stream, tlv.value_len, &s32_value)); in snmp_parse_inbound_frame()
845 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
846 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_OCTET_STRING); in snmp_parse_inbound_frame()
847 parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_parse_inbound_frame()
850 IF_PARSE_EXEC(snmp_asn1_dec_s32t(&pbuf_stream, tlv.value_len, &s32_value)); in snmp_parse_inbound_frame()
854 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
855 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_INTEGER); in snmp_parse_inbound_frame()
856 parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_parse_inbound_frame()
859 IF_PARSE_EXEC(snmp_asn1_dec_s32t(&pbuf_stream, tlv.value_len, &s32_value)); in snmp_parse_inbound_frame()
869 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
870 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_OCTET_STRING); in snmp_parse_inbound_frame()
871 parent_tlv_value_len -= SNMP_ASN1_TLV_HDR_LENGTH(tlv); in snmp_parse_inbound_frame()
875 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
876 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_SEQUENCE); in snmp_parse_inbound_frame()
877 parent_tlv_value_len -= SNMP_ASN1_TLV_HDR_LENGTH(tlv); in snmp_parse_inbound_frame()
881 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
882 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_OCTET_STRING); in snmp_parse_inbound_frame()
883 parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_parse_inbound_frame()
886 … IF_PARSE_EXEC(snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->msg_authoritative_engine_id, in snmp_parse_inbound_frame()
891 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
892 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_INTEGER); in snmp_parse_inbound_frame()
893 parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_parse_inbound_frame()
895 …IF_PARSE_EXEC(snmp_asn1_dec_s32t(&pbuf_stream, tlv.value_len, &request->msg_authoritative_engine_b… in snmp_parse_inbound_frame()
898 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
899 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_INTEGER); in snmp_parse_inbound_frame()
900 parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_parse_inbound_frame()
902 …IF_PARSE_EXEC(snmp_asn1_dec_s32t(&pbuf_stream, tlv.value_len, &request->msg_authoritative_engine_t… in snmp_parse_inbound_frame()
905 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
906 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_OCTET_STRING); in snmp_parse_inbound_frame()
907 parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_parse_inbound_frame()
910 IF_PARSE_EXEC(snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->msg_user_name, in snmp_parse_inbound_frame()
916 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
917 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_OCTET_STRING); in snmp_parse_inbound_frame()
918 parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_parse_inbound_frame()
925 …IF_PARSE_EXEC(snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->msg_authentication_parameter… in snmp_parse_inbound_frame()
926 &u16_value, tlv.value_len)); in snmp_parse_inbound_frame()
931 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
932 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_OCTET_STRING); in snmp_parse_inbound_frame()
933 parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_parse_inbound_frame()
936 IF_PARSE_EXEC(snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->msg_privacy_parameters, in snmp_parse_inbound_frame()
1078 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
1079 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_OCTET_STRING); in snmp_parse_inbound_frame()
1080 parent_tlv_value_len -= SNMP_ASN1_TLV_HDR_LENGTH(tlv); in snmp_parse_inbound_frame()
1084 if (snmpv3_crypt(&pbuf_stream, tlv.value_len, key, in snmp_parse_inbound_frame()
1103 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
1104 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_SEQUENCE); in snmp_parse_inbound_frame()
1105 parent_tlv_value_len -= SNMP_ASN1_TLV_HDR_LENGTH(tlv); in snmp_parse_inbound_frame()
1109 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
1110 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_OCTET_STRING); in snmp_parse_inbound_frame()
1111 parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_parse_inbound_frame()
1114 IF_PARSE_EXEC(snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->context_engine_id, in snmp_parse_inbound_frame()
1120 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
1121 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_OCTET_STRING); in snmp_parse_inbound_frame()
1122 parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_parse_inbound_frame()
1125 IF_PARSE_EXEC(snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->context_name, in snmp_parse_inbound_frame()
1133 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
1134 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_OCTET_STRING); in snmp_parse_inbound_frame()
1135 parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_parse_inbound_frame()
1138 …err = snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->community, &request->community_strle… in snmp_parse_inbound_frame()
1142 snmp_pbuf_stream_seek(&pbuf_stream, tlv.value_len); in snmp_parse_inbound_frame()
1151 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
1152 IF_PARSE_ASSERT(tlv.value_len <= pbuf_stream.length); in snmp_parse_inbound_frame()
1153 request->inbound_padding_len = pbuf_stream.length - tlv.value_len; in snmp_parse_inbound_frame()
1154 parent_tlv_value_len = tlv.value_len; in snmp_parse_inbound_frame()
1157 switch (tlv.type) { in snmp_parse_inbound_frame()
1179 LWIP_DEBUGF(SNMP_DEBUG, ("Unknown/Invalid SNMP PDU type received: %d", tlv.type)); \ in snmp_parse_inbound_frame()
1182 request->request_type = tlv.type & SNMP_ASN1_DATATYPE_MASK; in snmp_parse_inbound_frame()
1212 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
1213 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_INTEGER); in snmp_parse_inbound_frame()
1214 parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_parse_inbound_frame()
1217 IF_PARSE_EXEC(snmp_asn1_dec_s32t(&pbuf_stream, tlv.value_len, &request->request_id)); in snmp_parse_inbound_frame()
1220 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
1221 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_INTEGER); in snmp_parse_inbound_frame()
1222 parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_parse_inbound_frame()
1226 IF_PARSE_EXEC(snmp_asn1_dec_s32t(&pbuf_stream, tlv.value_len, &request->non_repeaters)); in snmp_parse_inbound_frame()
1233 IF_PARSE_EXEC(snmp_asn1_dec_s32t(&pbuf_stream, tlv.value_len, &s32_value)); in snmp_parse_inbound_frame()
1238 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
1239 IF_PARSE_ASSERT(tlv.type == SNMP_ASN1_TYPE_INTEGER); in snmp_parse_inbound_frame()
1240 parent_tlv_value_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_parse_inbound_frame()
1244 IF_PARSE_EXEC(snmp_asn1_dec_s32t(&pbuf_stream, tlv.value_len, &request->max_repetitions)); in snmp_parse_inbound_frame()
1250 IF_PARSE_EXEC(snmp_asn1_dec_s32t(&pbuf_stream, tlv.value_len, &request->error_index)); in snmp_parse_inbound_frame()
1255 IF_PARSE_EXEC(snmp_asn1_dec_tlv(&pbuf_stream, &tlv)); in snmp_parse_inbound_frame()
1256 IF_PARSE_ASSERT((tlv.type == SNMP_ASN1_TYPE_SEQUENCE) && (tlv.value_len <= pbuf_stream.length)); in snmp_parse_inbound_frame()
1270 struct snmp_asn1_tlv tlv; in snmp_prepare_outbound_frame() local
1282 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, 3, 0); in snmp_prepare_outbound_frame()
1283 OF_BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); in snmp_prepare_outbound_frame()
1286 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 0); in snmp_prepare_outbound_frame()
1287 snmp_asn1_enc_s32t_cnt(request->version, &tlv.value_len); in snmp_prepare_outbound_frame()
1288 OF_BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); in snmp_prepare_outbound_frame()
1289 OF_BUILD_EXEC( snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, request->version) ); in snmp_prepare_outbound_frame()
1295 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 0, request->community_strlen); in snmp_prepare_outbound_frame()
1296 OF_BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); in snmp_prepare_outbound_frame()
1304 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, 1, 0); in snmp_prepare_outbound_frame()
1305 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1308 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 1); in snmp_prepare_outbound_frame()
1309 snmp_asn1_enc_s32t_cnt(request->msg_id, &tlv.value_len); in snmp_prepare_outbound_frame()
1310 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1311 OF_BUILD_EXEC(snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, request->msg_id)); in snmp_prepare_outbound_frame()
1314 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 1); in snmp_prepare_outbound_frame()
1315 snmp_asn1_enc_s32t_cnt(request->msg_max_size, &tlv.value_len); in snmp_prepare_outbound_frame()
1316 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1317 OF_BUILD_EXEC(snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, request->msg_max_size)); in snmp_prepare_outbound_frame()
1320 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 0, 1); in snmp_prepare_outbound_frame()
1321 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1325 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 1); in snmp_prepare_outbound_frame()
1326 snmp_asn1_enc_s32t_cnt(request->msg_security_model, &tlv.value_len); in snmp_prepare_outbound_frame()
1327 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1328 OF_BUILD_EXEC(snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, request->msg_security_model)); in snmp_prepare_outbound_frame()
1335 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 1, 0); in snmp_prepare_outbound_frame()
1336 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1339 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, 1, 0); in snmp_prepare_outbound_frame()
1340 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1345 …SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 0, request->msg_authoritative_engine_id… in snmp_prepare_outbound_frame()
1346 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1353 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 0); in snmp_prepare_outbound_frame()
1354 snmp_asn1_enc_s32t_cnt(request->msg_authoritative_engine_boots, &tlv.value_len); in snmp_prepare_outbound_frame()
1355 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1356 …OF_BUILD_EXEC(snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, request->msg_authoritative_engine_boo… in snmp_prepare_outbound_frame()
1359 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 0); in snmp_prepare_outbound_frame()
1360 snmp_asn1_enc_s32t_cnt(request->msg_authoritative_engine_time, &tlv.value_len); in snmp_prepare_outbound_frame()
1361 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1362 …OF_BUILD_EXEC(snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, request->msg_authoritative_engine_tim… in snmp_prepare_outbound_frame()
1365 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 0, request->msg_user_name_len); in snmp_prepare_outbound_frame()
1366 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1374 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 1, SNMP_V3_MAX_AUTH_PARAM_LENGTH); in snmp_prepare_outbound_frame()
1375 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1380 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 0, 0); in snmp_prepare_outbound_frame()
1381 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1389 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 0, SNMP_V3_MAX_PRIV_PARAM_LENGTH); in snmp_prepare_outbound_frame()
1390 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1395 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 0, 0); in snmp_prepare_outbound_frame()
1396 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); in snmp_prepare_outbound_frame()
1406 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 3, 0); in snmp_prepare_outbound_frame()
1407 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1414 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, 3, 0); in snmp_prepare_outbound_frame()
1415 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1420 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 0, request->context_engine_id_len); in snmp_prepare_outbound_frame()
1421 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1425 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 0, request->context_name_len); in snmp_prepare_outbound_frame()
1426 OF_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_prepare_outbound_frame()
1433 SNMP_ASN1_SET_TLV_PARAMS(tlv, request->request_out_type, 3, 0); in snmp_prepare_outbound_frame()
1434 OF_BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); in snmp_prepare_outbound_frame()
1437 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 0); in snmp_prepare_outbound_frame()
1438 snmp_asn1_enc_s32t_cnt(request->request_id, &tlv.value_len); in snmp_prepare_outbound_frame()
1439 OF_BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); in snmp_prepare_outbound_frame()
1440 OF_BUILD_EXEC( snmp_asn1_enc_s32t(pbuf_stream, tlv.value_len, request->request_id) ); in snmp_prepare_outbound_frame()
1443 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 1); in snmp_prepare_outbound_frame()
1444 OF_BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); in snmp_prepare_outbound_frame()
1449 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_INTEGER, 0, 1); in snmp_prepare_outbound_frame()
1450 OF_BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); in snmp_prepare_outbound_frame()
1455 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, 3, 0); in snmp_prepare_outbound_frame()
1456 OF_BUILD_EXEC( snmp_ans1_enc_tlv(pbuf_stream, &tlv) ); in snmp_prepare_outbound_frame()
1534 struct snmp_asn1_tlv tlv; in snmp_append_outbound_varbind() local
1552 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, len.vb_len_len, len.vb_value_len); in snmp_append_outbound_varbind()
1553 OVB_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_append_outbound_varbind()
1556 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OBJECT_ID, len.oid_len_len, len.oid_value_len); in snmp_append_outbound_varbind()
1557 OVB_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_append_outbound_varbind()
1561 SNMP_ASN1_SET_TLV_PARAMS(tlv, varbind->type, len.value_len_len, len.value_value_len); in snmp_append_outbound_varbind()
1562 OVB_BUILD_EXEC(snmp_ans1_enc_tlv(pbuf_stream, &tlv)); in snmp_append_outbound_varbind()
1604 struct snmp_asn1_tlv tlv; in snmp_complete_outbound_frame() local
1686 …SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, 3, frame_size + outbound_padding - 1 - 3); … in snmp_complete_outbound_frame()
1688 OF_BUILD_EXEC( snmp_ans1_enc_tlv(&(request->outbound_pbuf_stream), &tlv) ); in snmp_complete_outbound_frame()
1694 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, 1, request->outbound_msg_global_data_end in snmp_complete_outbound_frame()
1697 OF_BUILD_EXEC(snmp_ans1_enc_tlv(&(request->outbound_pbuf_stream), &tlv)); in snmp_complete_outbound_frame()
1700 …SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 1, request->outbound_msg_security_param… in snmp_complete_outbound_frame()
1703 OF_BUILD_EXEC(snmp_ans1_enc_tlv(&(request->outbound_pbuf_stream), &tlv)); in snmp_complete_outbound_frame()
1705 …SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, 1, request->outbound_msg_security_parameter… in snmp_complete_outbound_frame()
1708 OF_BUILD_EXEC(snmp_ans1_enc_tlv(&(request->outbound_pbuf_stream), &tlv)); in snmp_complete_outbound_frame()
1711 …SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, 3, frame_size - request->outbound_scoped_pd… in snmp_complete_outbound_frame()
1713 OF_BUILD_EXEC(snmp_ans1_enc_tlv(&(request->outbound_pbuf_stream), &tlv)); in snmp_complete_outbound_frame()
1718 SNMP_ASN1_SET_TLV_PARAMS(tlv, request->request_out_type, 3, in snmp_complete_outbound_frame()
1721 OF_BUILD_EXEC( snmp_ans1_enc_tlv(&(request->outbound_pbuf_stream), &tlv) ); in snmp_complete_outbound_frame()
1778 …SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_SEQUENCE, 3, frame_size - request->outbound_varbind_o… in snmp_complete_outbound_frame()
1780 OF_BUILD_EXEC( snmp_ans1_enc_tlv(&(request->outbound_pbuf_stream), &tlv) ); in snmp_complete_outbound_frame()
1792 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 3, frame_size + outbound_padding in snmp_complete_outbound_frame()
1794 OF_BUILD_EXEC(snmp_ans1_enc_tlv(&(request->outbound_pbuf_stream), &tlv)); in snmp_complete_outbound_frame()
1798 OF_BUILD_EXEC(snmpv3_crypt(&request->outbound_pbuf_stream, tlv.value_len, key, in snmp_complete_outbound_frame()
1819 SNMP_ASN1_SET_TLV_PARAMS(tlv, SNMP_ASN1_TYPE_OCTET_STRING, 1, SNMP_V3_MAX_AUTH_PARAM_LENGTH); in snmp_complete_outbound_frame()
1820 OF_BUILD_EXEC(snmp_ans1_enc_tlv(&request->outbound_pbuf_stream, &tlv)); in snmp_complete_outbound_frame()
1866 struct snmp_asn1_tlv tlv; in snmp_vb_enumerator_get_next() local
1876 VB_PARSE_EXEC(snmp_asn1_dec_tlv(&(enumerator->pbuf_stream), &tlv)); in snmp_vb_enumerator_get_next()
1877 …VB_PARSE_ASSERT((tlv.type == SNMP_ASN1_TYPE_SEQUENCE) && (tlv.value_len <= enumerator->pbuf_stream… in snmp_vb_enumerator_get_next()
1878 varbind_len = tlv.value_len; in snmp_vb_enumerator_get_next()
1881 VB_PARSE_EXEC(snmp_asn1_dec_tlv(&(enumerator->pbuf_stream), &tlv)); in snmp_vb_enumerator_get_next()
1882 …VB_PARSE_ASSERT((tlv.type == SNMP_ASN1_TYPE_OBJECT_ID) && (SNMP_ASN1_TLV_LENGTH(tlv) < varbind_len… in snmp_vb_enumerator_get_next()
1884 …VB_PARSE_EXEC(snmp_asn1_dec_oid(&(enumerator->pbuf_stream), tlv.value_len, varbind->oid.id, &(varb… in snmp_vb_enumerator_get_next()
1885 varbind_len -= SNMP_ASN1_TLV_LENGTH(tlv); in snmp_vb_enumerator_get_next()
1888 VB_PARSE_EXEC(snmp_asn1_dec_tlv(&(enumerator->pbuf_stream), &tlv)); in snmp_vb_enumerator_get_next()
1889 …VB_PARSE_ASSERT((SNMP_ASN1_TLV_LENGTH(tlv) == varbind_len) && (tlv.value_len <= enumerator->pbuf_s… in snmp_vb_enumerator_get_next()
1890 varbind->type = tlv.type; in snmp_vb_enumerator_get_next()
1896 …VB_PARSE_EXEC(snmp_asn1_dec_s32t(&(enumerator->pbuf_stream), tlv.value_len, (s32_t *)varbind->valu… in snmp_vb_enumerator_get_next()
1902 …VB_PARSE_EXEC(snmp_asn1_dec_u32t(&(enumerator->pbuf_stream), tlv.value_len, (u32_t *)varbind->valu… in snmp_vb_enumerator_get_next()
1907 …err = snmp_asn1_dec_raw(&(enumerator->pbuf_stream), tlv.value_len, (u8_t *)varbind->value, &varbin… in snmp_vb_enumerator_get_next()
1918 …err = snmp_asn1_dec_oid(&(enumerator->pbuf_stream), tlv.value_len, (u32_t *)varbind->value, &tlv.l… in snmp_vb_enumerator_get_next()
1923 varbind->value_len = tlv.length_len * sizeof(u32_t); in snmp_vb_enumerator_get_next()
1926 if (tlv.value_len == 4) { in snmp_vb_enumerator_get_next()
1928 …VB_PARSE_EXEC(snmp_asn1_dec_raw(&(enumerator->pbuf_stream), tlv.value_len, (u8_t *)varbind->value,… in snmp_vb_enumerator_get_next()
1935 …VB_PARSE_EXEC(snmp_asn1_dec_u64t(&(enumerator->pbuf_stream), tlv.value_len, (u64_t *)varbind->valu… in snmp_vb_enumerator_get_next()
1944 snmp_pbuf_stream_seek(&(enumerator->pbuf_stream), tlv.value_len); in snmp_vb_enumerator_get_next()
1945 varbind->value_len = tlv.value_len; in snmp_vb_enumerator_get_next()