Lines Matching +full:offset +full:- +full:x
21 …ps://web.archive.org/web/20160401194747/http://www.oiforum.com/public/documents/OIF-UNI-01.0.pdf */
25 #include "netdissect-stdinc.h"
39 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
41 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
43 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
55 #define LMP_EXTRACT_VERSION(x) (((x)&0xf000)>>12) argument
93 { 0x08, "Link-Id configuration error"},
94 { 0x10, "Unknown object c-type"},
99 { 0x01, "Unacceptable non-negotiable LINK-SUMMARY parameters"},
100 { 0x02, "Renegotiate LINK-SUMMARY parameters"},
101 { 0x04, "Invalid TE-LINK Object"},
102 { 0x08, "Invalid DATA-LINK Object"},
103 { 0x10, "Unknown TE-LINK Object c-type"},
104 { 0x20, "Unknown DATA-LINK Object c-type"},
207 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
208 * |N| C-Type | Class | Length |
209 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
213 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
293 /* C-Types for Service Config Object */
359 int total_subobj_len, int offset) in lmp_print_data_link_subobjs() argument
370 subobj_type = GET_U_1(obj_tptr + offset); in lmp_print_data_link_subobjs()
371 subobj_len = GET_U_1(obj_tptr + offset + 1); in lmp_print_data_link_subobjs()
395 GET_U_1(obj_tptr + offset + 2)), in lmp_print_data_link_subobjs()
396 GET_U_1(obj_tptr + offset + 2)); in lmp_print_data_link_subobjs()
400 GET_U_1(obj_tptr + offset + 3)), in lmp_print_data_link_subobjs()
401 GET_U_1(obj_tptr + offset + 3)); in lmp_print_data_link_subobjs()
402 bw.i = GET_BE_U_4(obj_tptr + offset + 4); in lmp_print_data_link_subobjs()
405 bw.i = GET_BE_U_4(obj_tptr + offset + 8); in lmp_print_data_link_subobjs()
411 GET_BE_U_4(obj_tptr + offset + 4)); in lmp_print_data_link_subobjs()
418 total_subobj_len-=subobj_len; in lmp_print_data_link_subobjs()
419 offset+=subobj_len; in lmp_print_data_link_subobjs()
432 u_int offset; in lmp_print() local
440 ndo->ndo_protocol = "lmp"; in lmp_print()
445 version_res = GET_BE_U_2(lmp_com_header->version_res); in lmp_print()
456 /* in non-verbose mode just lets print the basic Message Type*/ in lmp_print()
457 if (ndo->ndo_vflag < 1) { in lmp_print()
460 tok2str(lmp_msg_type_values, "unknown (%u)",GET_U_1(lmp_com_header->msg_type)), in lmp_print()
465 /* ok they seem to want to know everything - lets fully decode it */ in lmp_print()
467 tlen=GET_BE_U_2(lmp_com_header->length); in lmp_print()
469 ND_PRINT("\n\tLMPv%u, msg-type: %s, Flags: [%s], length: %u", in lmp_print()
471 tok2str(lmp_msg_type_values, "unknown, type: %u",GET_U_1(lmp_com_header->msg_type)), in lmp_print()
472 bittok2str(lmp_header_flag_values,"none",GET_U_1(lmp_com_header->flags)), in lmp_print()
484 tlen-=sizeof(struct lmp_common_header); in lmp_print()
489 lmp_obj_len=GET_BE_U_2(lmp_obj_header->length); in lmp_print()
490 lmp_obj_ctype=GET_U_1(lmp_obj_header->ctype)&0x7f; in lmp_print()
492 ND_PRINT("\n\t %s Object (%u), Class-Type: %s (%u) Flags: [%snegotiable], length: %u", in lmp_print()
495 GET_U_1(lmp_obj_header->class_num)), in lmp_print()
496 GET_U_1(lmp_obj_header->class_num), in lmp_print()
499 (GET_U_1(lmp_obj_header->class_num)<<8)+lmp_obj_ctype), in lmp_print()
501 GET_U_1(lmp_obj_header->ctype)&0x80 ? "" : "non-", in lmp_print()
514 obj_tlen=lmp_obj_len-sizeof(struct lmp_object_header); in lmp_print()
520 switch(GET_U_1(lmp_obj_header->class_num)) { in lmp_print()
530 ND_PRINT("\n\t Control Channel ID: %u (0x%08x)", in lmp_print()
549 ND_PRINT("\n\t IPv4 Link ID: %s (0x%08x)", in lmp_print()
559 ND_PRINT("\n\t IPv6 Link ID: %s (0x%08x)", in lmp_print()
569 ND_PRINT("\n\t Link ID: %u (0x%08x)", in lmp_print()
585 ND_PRINT("\n\t Message ID: %u (0x%08x)", in lmp_print()
594 ND_PRINT("\n\t Message ID Ack: %u (0x%08x)", in lmp_print()
611 ND_PRINT("\n\t Node ID: %s (0x%08x)", in lmp_print()
667 ND_PRINT("\n\t Local Link-ID: %s (0x%08x)" in lmp_print()
668 "\n\t Remote Link-ID: %s (0x%08x)", in lmp_print()
685 ND_PRINT("\n\t Local Link-ID: %s (0x%08x)" in lmp_print()
686 "\n\t Remote Link-ID: %s (0x%08x)", in lmp_print()
703 ND_PRINT("\n\t Local Link-ID: %u (0x%08x)" in lmp_print()
704 "\n\t Remote Link-ID: %u (0x%08x)", in lmp_print()
727 ND_PRINT("\n\t Local Interface ID: %s (0x%08x)" in lmp_print()
728 "\n\t Remote Interface ID: %s (0x%08x)", in lmp_print()
734 if (lmp_print_data_link_subobjs(ndo, obj_tptr, obj_tlen - 12, 12)) in lmp_print()
747 ND_PRINT("\n\t Local Interface ID: %s (0x%08x)" in lmp_print()
748 "\n\t Remote Interface ID: %s (0x%08x)", in lmp_print()
754 if (lmp_print_data_link_subobjs(ndo, obj_tptr, obj_tlen - 36, 36)) in lmp_print()
767 ND_PRINT("\n\t Local Interface ID: %u (0x%08x)" in lmp_print()
768 "\n\t Remote Interface ID: %u (0x%08x)", in lmp_print()
774 if (lmp_print_data_link_subobjs(ndo, obj_tptr, obj_tlen - 12, 12)) in lmp_print()
800 ND_PRINT("\n\t Verify Transport Mechanism: %u (0x%x)%s", in lmp_print()
852 offset = 0; in lmp_print()
854 while (offset+8 <= obj_tlen) { in lmp_print()
855 ND_PRINT("\n\t Interface ID: %s (0x%08x)", in lmp_print()
856 GET_IPADDR_STRING(obj_tptr+offset), in lmp_print()
857 GET_BE_U_4(obj_tptr + offset)); in lmp_print()
860 (GET_BE_U_4(obj_tptr + offset + 4)>>31) ? in lmp_print()
861 "Allocated" : "Non-allocated", in lmp_print()
862 (GET_BE_U_4(obj_tptr + offset + 4)>>31)); in lmp_print()
865 (GET_BE_U_4(obj_tptr + offset + 4)>>30)&0x1 ? in lmp_print()
867 (GET_BE_U_4(obj_tptr + offset + 4)>>30)&0x1); in lmp_print()
872 GET_BE_U_4(obj_tptr + offset + 4)&0x3FFFFFF), in lmp_print()
873 GET_BE_U_4(obj_tptr + offset + 4)&0x3FFFFFF); in lmp_print()
874 offset+=8; in lmp_print()
879 offset = 0; in lmp_print()
881 while (offset+20 <= obj_tlen) { in lmp_print()
882 ND_PRINT("\n\t Interface ID: %s (0x%08x)", in lmp_print()
883 GET_IP6ADDR_STRING(obj_tptr+offset), in lmp_print()
884 GET_BE_U_4(obj_tptr + offset)); in lmp_print()
887 (GET_BE_U_4(obj_tptr + offset + 16)>>31) ? in lmp_print()
888 "Allocated" : "Non-allocated", in lmp_print()
889 (GET_BE_U_4(obj_tptr + offset + 16)>>31)); in lmp_print()
892 (GET_BE_U_4(obj_tptr + offset + 16)>>30)&0x1 ? in lmp_print()
894 (GET_BE_U_4(obj_tptr + offset + 16)>>30)&0x1); in lmp_print()
899 GET_BE_U_4(obj_tptr + offset + 16)&0x3FFFFFF), in lmp_print()
900 GET_BE_U_4(obj_tptr + offset + 16)&0x3FFFFFF); in lmp_print()
901 offset+=20; in lmp_print()
906 offset = 0; in lmp_print()
908 while (offset+8 <= obj_tlen) { in lmp_print()
909 ND_PRINT("\n\t Interface ID: %u (0x%08x)", in lmp_print()
910 GET_BE_U_4(obj_tptr + offset), in lmp_print()
911 GET_BE_U_4(obj_tptr + offset)); in lmp_print()
914 (GET_BE_U_4(obj_tptr + offset + 4)>>31) ? in lmp_print()
915 "Allocated" : "Non-allocated", in lmp_print()
916 (GET_BE_U_4(obj_tptr + offset + 4)>>31)); in lmp_print()
919 (GET_BE_U_4(obj_tptr + offset + 4)>>30)&0x1 ? in lmp_print()
921 (GET_BE_U_4(obj_tptr + offset + 4)>>30)&0x1); in lmp_print()
926 GET_BE_U_4(obj_tptr + offset + 4)&0x3FFFFFF), in lmp_print()
927 GET_BE_U_4(obj_tptr + offset + 4)&0x3FFFFFF); in lmp_print()
928 offset+=8; in lmp_print()
940 offset = 0; in lmp_print()
941 while (offset+4 <= obj_tlen) { in lmp_print()
942 ND_PRINT("\n\t Interface ID: %s (0x%08x)", in lmp_print()
943 GET_IPADDR_STRING(obj_tptr+offset), in lmp_print()
944 GET_BE_U_4(obj_tptr + offset)); in lmp_print()
945 offset+=4; in lmp_print()
950 offset = 0; in lmp_print()
951 while (offset+16 <= obj_tlen) { in lmp_print()
952 ND_PRINT("\n\t Interface ID: %s (0x%08x)", in lmp_print()
953 GET_IP6ADDR_STRING(obj_tptr+offset), in lmp_print()
954 GET_BE_U_4(obj_tptr + offset)); in lmp_print()
955 offset+=16; in lmp_print()
960 offset = 0; in lmp_print()
961 while (offset+4 <= obj_tlen) { in lmp_print()
962 ND_PRINT("\n\t Interface ID: %u (0x%08x)", in lmp_print()
963 GET_BE_U_4(obj_tptr + offset), in lmp_print()
964 GET_BE_U_4(obj_tptr + offset)); in lmp_print()
965 offset+=4; in lmp_print()
1072 ND_PRINT("\n\t Local Interface ID: %s (0x%08x)", in lmp_print()
1118 if (ndo->ndo_vflag <= 1) in lmp_print()
1123 if (ndo->ndo_vflag > 1 || hexdump==TRUE) in lmp_print()
1125 lmp_obj_len-sizeof(struct lmp_object_header)); in lmp_print()
1133 tlen-=lmp_obj_len; in lmp_print()