Lines Matching refs:tptr

580 lldp_private_8021_print(const u_char *tptr, u_int tlv_len)
588 subtype = *(tptr+3);
600 EXTRACT_16BITS(tptr+4));
607 EXTRACT_16BITS(tptr+5),
608 bittok2str(lldp_8021_port_protocol_id_values, "none", *(tptr+4)),
609 *(tptr+4));
616 EXTRACT_16BITS(tptr+4));
620 sublen = *(tptr+6);
625 safeputs((const char *)tptr+7, sublen);
631 sublen = *(tptr+4);
636 safeputs((const char *)tptr+5, sublen);
651 lldp_private_8023_print(const u_char *tptr, u_int tlv_len)
658 subtype = *(tptr+3);
670 bittok2str(lldp_8023_autonegotiation_values, "none", *(tptr+4)),
671 *(tptr+4));
673 bittok2str(lldp_pmd_capability_values,"unknown", EXTRACT_16BITS(tptr+5)),
674 EXTRACT_16BITS(tptr+5));
676 tok2str(lldp_mau_types_values, "unknown", EXTRACT_16BITS(tptr+7)),
677 EXTRACT_16BITS(tptr+7));
685 bittok2str(lldp_mdi_values, "none", *(tptr+4)),
686 tok2str(lldp_mdi_power_pairs_values, "unknown", *(tptr+5)),
687 tok2str(lldp_mdi_power_class_values, "unknown", *(tptr+6)));
695 bittok2str(lldp_aggregation_values, "none", *(tptr+4)),
696 EXTRACT_32BITS(tptr+5));
700 printf("\n\t MTU size %u", EXTRACT_16BITS(tptr+4));
715 lldp_extract_latlon(const u_char *tptr)
719 latlon = *tptr & 0x3;
720 latlon = (latlon << 32) | EXTRACT_32BITS(tptr+1);
729 lldp_private_tia_print(const u_char *tptr, u_int tlv_len)
740 subtype = *(tptr+3);
753 EXTRACT_16BITS(tptr+4)), EXTRACT_16BITS(tptr+4));
755 tok2str(lldp_tia_device_type_values, "unknown", *(tptr+6)),
756 *(tptr+6));
764 tok2str(lldp_tia_application_type_values, "none", *(tptr+4)),
765 *(tptr+4));
767 lldp_tia_network_policy_bits_values, "none", *(tptr+5)));
769 LLDP_EXTRACT_NETWORK_POLICY_VLAN(EXTRACT_16BITS(tptr+5)));
771 LLDP_EXTRACT_NETWORK_POLICY_L2_PRIORITY(EXTRACT_16BITS(tptr+6)));
773 LLDP_EXTRACT_NETWORK_POLICY_DSCP(EXTRACT_16BITS(tptr+6)));
780 location_format = *(tptr+4);
791 (*(tptr+5)>>2), lldp_extract_latlon(tptr+5));
793 (*(tptr+10)>>2), lldp_extract_latlon(tptr+10));
795 tok2str(lldp_tia_location_altitude_type_values, "unknown",(*(tptr+15)>>4)),
796 (*(tptr+15)>>4));
798 (EXTRACT_16BITS(tptr+15)>>6)&0x3f,
799 ((EXTRACT_32BITS(tptr+16)&0x3fffffff)));
801 tok2str(lldp_tia_location_datum_type_values, "unknown", *(tptr+20)),
802 *(tptr+20));
809 lci_len = *(tptr+5);
818 tok2str(lldp_tia_location_lci_what_values, "unknown", *(tptr+6)),
819 *(tptr+6));
822 safeputs((const char *)(tptr+7), 2);
825 tptr = tptr + 9;
832 ca_type = *(tptr);
833 ca_len = *(tptr+1);
835 tptr += 2;
850 safeputs((const char *)tptr, ca_len);
851 tptr += ca_len;
858 safeputs((const char *)tptr+5, tlv_len-5);
863 print_unknown_data(tptr+5, "\n\t ", tlv_len-5);
872 (*(tptr+4)&0xC0>>6) ? "PD device" : "PSE device");
874 tok2str(lldp_tia_power_source_values, "none", (*(tptr+4)&0x30)>>4));
876 tok2str(lldp_tia_power_priority_values, "none", *(tptr+4)&0x0f),
877 *(tptr+4)&0x0f);
878 power_val = EXTRACT_16BITS(tptr+5);
895 safeputs((const char *)tptr+4, tlv_len-4);
917 const u_char *tptr, *mptr;
932 tptr = pptr + 4;
937 TCHECK2(*tptr, sizeof(tlv));
939 tlv = EXTRACT_16BITS(tptr);
946 tptr += sizeof(tlv);
953 TCHECK2(*tptr, tlv_len);
966 printf("\n\t Oper_Version: %d", *tptr);
967 printf("\n\t Max_Version: %d", *(tptr+1));
968 printf("\n\t Sequence Number: %d", EXTRACT_32BITS(tptr+2));
970 EXTRACT_32BITS(tptr+6));
978 printf("\n\t Oper_Version: %d", *tptr);
979 printf("\n\t Max_Version: %d", *(tptr+1));
980 printf("\n\t Info block(0x%02X): ", *(tptr+2));
981 tval = *(tptr+2);
985 printf("\n\t SubType: %d", *(tptr+3));
988 pgval = EXTRACT_32BITS(tptr+4);
990 tval = *(tptr+4+(i/2));
996 printf("\n\t Pg percentage[%d]: %d", i, *(tptr+8+i));
997 printf("\n\t NumTCsSupported: %d", *(tptr+8+8));
1006 printf("\n\t Oper_Version: %d", *tptr);
1007 printf("\n\t Max_Version: %d", *(tptr+1));
1008 printf("\n\t Info block(0x%02X): ", *(tptr+2));
1009 tval = *(tptr+2);
1013 printf("\n\t SubType: %d", *(tptr+3));
1014 tval = *(tptr+4);
1015 printf("\n\t PFC Config (0x%02X)", *(tptr+4));
1019 printf("\n\t NumTCPFCSupported: %d", *(tptr+5));
1027 printf("\n\t Oper_Version: %d", *tptr);
1028 printf("\n\t Max_Version: %d", *(tptr+1));
1029 printf("\n\t Info block(0x%02X): ", *(tptr+2));
1030 tval = *(tptr+2);
1034 printf("\n\t SubType: %d", *(tptr+3));
1036 mptr = tptr + 4;
1058 print_unknown_data(tptr,"\n\t ", tlv_len);
1062 tptr += tlv_len;
1070 lldp_network_addr_print(const u_char *tptr, u_int len) {
1079 af = *tptr;
1108 tok2str(af_values, "Unknown", af), af, (*pfunc)(tptr+1));
1118 const u_char *tptr;
1123 tptr = pptr;
1128 mgmt_addr_len = *tptr++;
1135 mgmt_addr = lldp_network_addr_print(tptr, mgmt_addr_len);
1141 tptr += mgmt_addr_len;
1148 intf_num_subtype = *tptr;
1152 EXTRACT_32BITS(tptr+1));
1154 tptr += LLDP_INTF_NUM_LEN;
1161 oid_len = *tptr;
1168 safeputs((const char *)tptr+1, oid_len);
1181 const u_char *tptr;
1184 tptr = pptr;
1191 TCHECK2(*tptr, sizeof(tlv));
1193 tlv = EXTRACT_16BITS(tptr);
1200 tptr += sizeof(tlv);
1213 TCHECK2(*tptr, tlv_len);
1225 subtype = *tptr;
1235 printf("%s", etheraddr_string(tptr+1));
1243 safeputs((const char *)tptr+1, tlv_len-1);
1247 network_addr = lldp_network_addr_print(tptr+1, tlv_len-1);
1266 subtype = *tptr;
1276 printf("%s", etheraddr_string(tptr+1));
1284 safeputs((const char *)tptr+1, tlv_len-1);
1288 network_addr = lldp_network_addr_print(tptr+1, tlv_len-1);
1307 printf(": TTL %us", EXTRACT_16BITS(tptr));
1314 safeputs((const char *)tptr, tlv_len);
1324 safeputs((const char *)tptr, tlv_len);
1330 safeputs((const char *)tptr, tlv_len);
1345 cap = EXTRACT_16BITS(tptr);
1346 ena_cap = EXTRACT_16BITS(tptr+2);
1356 if (!lldp_mgmt_addr_tlv_print(tptr, tlv_len)) {
1367 oui = EXTRACT_24BITS(tptr);
1372 hexdump = lldp_private_8021_print(tptr, tlv_len);
1375 hexdump = lldp_private_8023_print(tptr, tlv_len);
1378 hexdump = lldp_private_tia_print(tptr, tlv_len);
1381 hexdump = lldp_private_dcbx_print(tptr, tlv_len);
1397 print_unknown_data(tptr,"\n\t ", tlv_len);
1401 tptr += tlv_len;