(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ncp2222.inc) |
| |
| 5023 | | | process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, packet_info *pinfo, nds_val *values) |
| 5024 | | | { |
| 5025 | | | guint32 i; |
| 5026 | | | guint32 r; |
| 5027 | | | guint32 ioffset = 0, oldioffset; |
| 5028 | | | guint32 value1 = 0; |
| 5029 | | | guint32 value2 = 0; |
| 5030 | | | guint8 value3 = 0; |
| 5031 | | | guint32 value4 = 0; |
| 5032 | | | gint value5 = 0; |
| 5033 | | | guint32 value6 = 0; |
| 5034 | | | guint32 value7 = 0; |
| 5035 | | | const char *valuestr = ""; |
| 5036 | | | proto_tree *ntree; |
| 5037 | | | proto_tree *atree; |
| 5038 | | | proto_item *nitem; |
| 5039 | | | proto_item *aitem; |
| 5040 | | | guint32 number_of_referrals = 0; |
| 5041 | | | proto_tree *estree; |
| 5042 | | | proto_item *esitem; |
| 5043 | | | guint16 replica_num = 0; |
| 5044 | | | guint16 event_num = 0; |
| 5045 | | | guint32 bvalue=0; |
| 5046 | | | nds_val temp_values; |
| 5047 | | | proto_tree *sub1tree; |
| 5048 | | | proto_item *sub1item; |
| 5049 | | | proto_tree *sub2tree; |
| 5050 | | | proto_item *sub2item; |
| 5051 | | | gint length_remaining; |
| 5052 | | | nstime_t ns; |
| 5053 | | | |
| 5054 | | | mv_resolve_name_string[0] = '\0'; |
| 5055 | | | values->vstring = ""; |
| 5056 | | | |
| 5057 | | | |
| 5058 | | | if(values->mvtype != MVTYPE_LIST_PARTITIONS && values->mvtype != MVTYPE_PROCESS_TAGS) |
| 5059 | | | { |
| 5060 | | | nitem = proto_tree_add_uint_format(ncp_tree, values->hfname, tvb, values->voffset+ioffset, |
| 5061 | | | values->vlength, values->vvalue, values->vdesc, values->vvalue); |
| 5062 | | | } |
| 5063 | | | else |
| 5064 | | | { |
| 5065 | | | nitem = proto_tree_add_string_format(ncp_tree, values->hfname, tvb, values->voffset+ioffset, |
| 5066 | | | values->vlength, values->vdesc, "%s", values->vdesc); |
| 5067 | | | } |
| 5068 | | | ioffset = (values->voffset+4); |
| 5069 | | | |
| 5070 | | | ntree = proto_item_add_subtree(nitem, ett_nds); |
| 5071 | | | |
| 5072 | | | switch (values->mvtype) |
| 5073 | | | { |
| 5074 | | | case MVTYPE_ATTR_REQUEST: |
| 5075 | | | for (i = 1 ; i <= values->vvalue; i++ ) |
| 5076 | | | { |
| 5077 | | | ioffset += align_4(tvb, ioffset); |
| 5078 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5079 | | | ioffset = ioffset + 4; |
| 5080 | | | values->vstring = get_string(tvb, ioffset, value1); |
| 5081 | | | proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset, |
| 5082 | | | value1, values->vstring); |
| 5083 | | | ioffset = ioffset + value1; |
| 5084 | | | } |
| 5085 | | | break; |
| 5086 | | | |
| 5087 | | | case MVTYPE_ATTR_REPLY: |
| 5088 | | | switch(values->vflags) |
| 5089 | | | { |
| 5090 | | | case 0: |
| 5091 | | | for (i = 1 ; i <= values->vvalue; i++ ) |
| 5092 | | | { |
| 5093 | | | ioffset += align_4(tvb, ioffset); |
| 5094 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5095 | | | ioffset = ioffset + 4; |
| 5096 | | | values->vstring = get_string(tvb, ioffset, value1); |
| 5097 | | | proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset, |
| 5098 | | | value1, values->vstring); |
| 5099 | | | ioffset = ioffset + value1; |
| 5100 | | | } |
| 5101 | | | break; |
| 5102 | | | case 1: |
| 5103 | | | for (i = 1 ; i <= values->vvalue; i++ ) |
| 5104 | | | { |
| 5105 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5106 | | | values->vstring = (char *)match_strval(value1, nds_syntax); |
| 5107 | | | if (values->vstring == NULL) |
| 5108 | | | { |
| 5109 | | | values->vstring = "No Syntax Found"; |
| 5110 | | | } |
| 5111 | | | proto_tree_add_string(ntree, hf_nds_syntax, tvb, ioffset, |
| 5112 | | | 4, values->vstring); |
| 5113 | | | ioffset = ioffset + 4; |
| 5114 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 5115 | | | ioffset = ioffset + 4; |
| 5116 | | | values->vstring = get_string(tvb, ioffset, value2); |
| 5117 | | | proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset, |
| 5118 | | | value2, values->vstring); |
| 5119 | | | ioffset += value2; |
| 5120 | | | ioffset += align_4(tvb, ioffset); |
| 5121 | | | values->voffset = ioffset; |
| 5122 | | | |
| 5123 | | | print_nds_values(ntree, tvb, value1, values); |
| 5124 | | | ioffset = values->voffset; |
| 5125 | | | } |
| 5126 | | | break; |
| 5127 | | | case 2: |
| 5128 | | | for (i = 1 ; i <= values->vvalue; i++ ) |
| 5129 | | | { |
| 5130 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5131 | | | values->vstring = (char *)match_strval(value1, nds_syntax); |
| 5132 | | | if (values->vstring == NULL) |
| 5133 | | | { |
| 5134 | | | values->vstring = "No Syntax Found"; |
| 5135 | | | } |
| 5136 | | | proto_tree_add_string(ntree, hf_nds_syntax, tvb, ioffset, |
| 5137 | | | 4, values->vstring); |
| 5138 | | | ioffset = ioffset + 4; |
| 5139 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 5140 | | | ioffset = ioffset + 4; |
| 5141 | | | values->vstring = get_string(tvb, ioffset, value2); |
| 5142 | | | proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset, |
| 5143 | | | value2, values->vstring); |
| 5144 | | | values->voffset=ioffset + value2; |
| 5145 | | | ioffset += value2; |
| 5146 | | | ioffset += align_4(tvb, ioffset); |
| 5147 | | | value3 = tvb_get_letohl(tvb, ioffset); |
| 5148 | | | |
| 5149 | | | proto_tree_add_uint_format(ntree, hf_nds_uint32value, tvb, ioffset, 4, |
| 5150 | | | value3, "Number of Values - %u", value3); |
| 5151 | | | |
| 5152 | | | ioffset = ioffset + 4; |
| 5153 | | | for (r = 1 ; r <= value3; r++ ) |
| 5154 | | | { |
| 5155 | | | ioffset += 4; |
| 5156 | | | value4 = tvb_get_letohl(tvb, ioffset); |
| 5157 | | | tvb_ensure_bytes_exist(tvb, ioffset, values->vlength); |
| 5158 | | | proto_tree_add_uint(ntree, hf_nds_privileges, tvb, ioffset, |
| 5159 | | | values->vlength, value4); |
| 5160 | | | |
| 5161 | | | ioffset = ioffset+4; |
| 5162 | | | } |
| 5163 | | | } |
| 5164 | | | break; |
| 5165 | | | case 3: |
| 5166 | | | for (i = 1 ; i <= values->vvalue; i++ ) |
| 5167 | | | { |
| 5168 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5169 | | | values->vstring = (char *)match_strval(value1, nds_syntax); |
| 5170 | | | if (values->vstring == NULL) |
| 5171 | | | { |
| 5172 | | | values->vstring = "No Syntax Found"; |
| 5173 | | | } |
| 5174 | | | proto_tree_add_string(ntree, hf_nds_syntax, tvb, ioffset, |
| 5175 | | | 4, values->vstring); |
| 5176 | | | ioffset = ioffset + 4; |
| 5177 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 5178 | | | ioffset = ioffset + 4; |
| 5179 | | | values->vstring = get_string(tvb, ioffset, value2); |
| 5180 | | | proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset, |
| 5181 | | | value2, values->vstring); |
| 5182 | | | ioffset = ioffset + value2; |
| 5183 | | | ioffset += align_4(tvb, ioffset); |
| 5184 | | | value3 = tvb_get_letohl(tvb, ioffset); |
| 5185 | | | |
| 5186 | | | aitem = proto_tree_add_uint_format(ntree, hf_nds_uint32value, tvb, ioffset, 4, |
| 5187 | | | value3, "Number of Values - %u", value3); |
| 5188 | | | |
| 5189 | | | atree = proto_item_add_subtree(aitem, ett_nds); |
| 5190 | | | |
| 5191 | | | ioffset = ioffset + 4; |
| 5192 | | | for (r = 1 ; r <= value3; r++ ) |
| 5193 | | | { |
| 5194 | | | ioffset += align_4(tvb, ioffset); |
| 5195 | | | temp_values.vvalue = tvb_get_letohl(tvb, ioffset); |
| 5196 | | | temp_values.vlength = 2; |
| 5197 | | | temp_values.hfname = hf_nds_vflags; |
| 5198 | | | temp_values.voffset = ioffset; |
| 5199 | | | temp_values.vdesc = "Value Flags"; |
| 5200 | | | temp_values.bit1 = "Naming"; |
| 5201 | | | temp_values.bit1hfname = hf_bit1vflags; |
| 5202 | | | temp_values.bit2 = "Base Class"; |
| 5203 | | | temp_values.bit2hfname = hf_bit2vflags; |
| 5204 | | | temp_values.bit3 = "Present"; |
| 5205 | | | temp_values.bit3hfname = hf_bit3vflags; |
| 5206 | | | temp_values.bit4 = "Value Damaged"; |
| 5207 | | | temp_values.bit4hfname = hf_bit4vflags; |
| 5208 | | | temp_values.bit5 = "Not Defined"; |
| 5209 | | | temp_values.bit5hfname = hf_bit5vflags; |
| 5210 | | | temp_values.bit6 = "Not Defined"; |
| 5211 | | | temp_values.bit6hfname = hf_bit6vflags; |
| 5212 | | | temp_values.bit7 = "Not Defined"; |
| 5213 | | | temp_values.bit7hfname = hf_bit7vflags; |
| 5214 | | | temp_values.bit8 = "Not Defined"; |
| 5215 | | | temp_values.bit8hfname = hf_bit8vflags; |
| 5216 | | | temp_values.bit9 = "Not Defined"; |
| 5217 | | | temp_values.bit9hfname = hf_bit9vflags; |
| 5218 | | | temp_values.bit10 = "Not Defined"; |
| 5219 | | | temp_values.bit10hfname = hf_bit10vflags; |
| 5220 | | | temp_values.bit11 = "Not Defined"; |
| 5221 | | | temp_values.bit11hfname = hf_bit11vflags; |
| 5222 | | | temp_values.bit12 = "Not Defined"; |
| 5223 | | | temp_values.bit12hfname = hf_bit12vflags; |
| 5224 | | | temp_values.bit13 = "Not Defined"; |
| 5225 | | | temp_values.bit13hfname = hf_bit13vflags; |
| 5226 | | | temp_values.bit14 = "Not Defined"; |
| 5227 | | | temp_values.bit14hfname = hf_bit14vflags; |
| 5228 | | | temp_values.bit15 = "Not Defined"; |
| 5229 | | | temp_values.bit15hfname = hf_bit15vflags; |
| 5230 | | | temp_values.bit16 = "Not Defined"; |
| 5231 | | | temp_values.bit16hfname = hf_bit16vflags; |
| 5232 | | | process_bitfield(atree, tvb, &temp_values); |
| 5233 | | | ioffset = ioffset + 4; |
| 5234 | | | ns.secs = tvb_get_letohl(tvb, ioffset); |
| 5235 | | | ns.nsecs = 0; |
| 5236 | | | proto_tree_add_time_format(atree, hf_es_seconds, tvb, ioffset, |
| 5237 | | | 4, &ns, "Timestamp: %s", abs_time_to_str(&ns)); |
| 5238 | | | ioffset = ioffset + 4; |
| 5239 | | | replica_num = tvb_get_letohs(tvb, ioffset); |
| 5240 | | | proto_tree_add_item(atree, hf_nds_replica_num, tvb, ioffset, |
| 5241 | | | 2, replica_num); |
| 5242 | | | ioffset = ioffset + 2; |
| 5243 | | | event_num = tvb_get_letohs(tvb, ioffset); |
| 5244 | | | proto_tree_add_item(atree, hf_nds_event_num, tvb, ioffset, |
| 5245 | | | 2, event_num); |
| 5246 | | | ioffset = ioffset + 2; |
| 5247 | | | value5 = tvb_get_letohl(tvb, ioffset); |
| 5248 | | | if(value5 > tvb_length_remaining(tvb, ioffset)) |
| 5249 | | | { |
| 5250 | | | break; |
| 5251 | | | } |
| 5252 | | | ioffset += 4; |
| 5253 | | | tvb_ensure_bytes_exist(tvb, ioffset, value5); |
| 5254 | | | proto_tree_add_bytes(atree, hf_value_bytes, tvb, ioffset, value5, tvb_get_ptr(tvb, ioffset, value5)); |
| 5255 | | | ioffset += value5; |
| 5256 | | | ioffset += (value5%2); |
| 5257 | | | } |
| 5258 | | | } |
| 5259 | | | break; |
| 5260 | | | case 4: |
| 5261 | | | for (i = 1 ; i <= values->vvalue; i++ ) |
| 5262 | | | { |
| 5263 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5264 | | | values->vstring = (char *)match_strval(value1, nds_syntax); |
| 5265 | | | if (values->vstring == NULL) |
| 5266 | | | { |
| 5267 | | | values->vstring = "No Syntax Found"; |
| 5268 | | | } |
| 5269 | | | proto_tree_add_string(ntree, hf_nds_syntax, tvb, ioffset, |
| 5270 | | | 4, values->vstring); |
| 5271 | | | ioffset = ioffset + 4; |
| 5272 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 5273 | | | ioffset = ioffset + 4; |
| 5274 | | | values->vstring = get_string(tvb, ioffset, value2); |
| 5275 | | | proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset, |
| 5276 | | | value2, values->vstring); |
| 5277 | | | ioffset = ioffset + value2; |
| 5278 | | | value3 = tvb_get_letohl(tvb, ioffset); |
| 5279 | | | |
| 5280 | | | proto_tree_add_uint_format(ntree, hf_nds_uint32value, tvb, ioffset, 4, |
| 5281 | | | value3, "Number of Values - %u", value3); |
| 5282 | | | |
| 5283 | | | ioffset = ioffset + 4; |
| 5284 | | | for (r = 1 ; r <= value3; r++ ) |
| 5285 | | | { |
| 5286 | | | ioffset += align_4(tvb, ioffset); |
| 5287 | | | temp_values.vvalue = tvb_get_letohl(tvb, ioffset); |
| 5288 | | | temp_values.vlength = 2; |
| 5289 | | | temp_values.hfname = hf_nds_vflags; |
| 5290 | | | temp_values.voffset = ioffset; |
| 5291 | | | temp_values.vdesc = "Value Flags"; |
| 5292 | | | temp_values.bit1 = "Naming"; |
| 5293 | | | temp_values.bit1hfname = hf_bit1vflags; |
| 5294 | | | temp_values.bit2 = "Base Class"; |
| 5295 | | | temp_values.bit2hfname = hf_bit2vflags; |
| 5296 | | | temp_values.bit3 = "Present"; |
| 5297 | | | temp_values.bit3hfname = hf_bit3vflags; |
| 5298 | | | temp_values.bit4 = "Value Damaged"; |
| 5299 | | | temp_values.bit4hfname = hf_bit4vflags; |
| 5300 | | | temp_values.bit5 = "Not Defined"; |
| 5301 | | | temp_values.bit5hfname = hf_bit5vflags; |
| 5302 | | | temp_values.bit6 = "Not Defined"; |
| 5303 | | | temp_values.bit6hfname = hf_bit6vflags; |
| 5304 | | | temp_values.bit7 = "Not Defined"; |
| 5305 | | | temp_values.bit7hfname = hf_bit7vflags; |
| 5306 | | | temp_values.bit8 = "Not Defined"; |
| 5307 | | | temp_values.bit8hfname = hf_bit8vflags; |
| 5308 | | | temp_values.bit9 = "Not Defined"; |
| 5309 | | | temp_values.bit9hfname = hf_bit9vflags; |
| 5310 | | | temp_values.bit10 = "Not Defined"; |
| 5311 | | | temp_values.bit10hfname = hf_bit10vflags; |
| 5312 | | | temp_values.bit11 = "Not Defined"; |
| 5313 | | | temp_values.bit11hfname = hf_bit11vflags; |
| 5314 | | | temp_values.bit12 = "Not Defined"; |
| 5315 | | | temp_values.bit12hfname = hf_bit12vflags; |
| 5316 | | | temp_values.bit13 = "Not Defined"; |
| 5317 | | | temp_values.bit13hfname = hf_bit13vflags; |
| 5318 | | | temp_values.bit14 = "Not Defined"; |
| 5319 | | | temp_values.bit14hfname = hf_bit14vflags; |
| 5320 | | | temp_values.bit15 = "Not Defined"; |
| 5321 | | | temp_values.bit15hfname = hf_bit15vflags; |
| 5322 | | | temp_values.bit16 = "Not Defined"; |
| 5323 | | | temp_values.bit16hfname = hf_bit16vflags; |
| 5324 | | | process_bitfield(ntree, tvb, &temp_values); |
| 5325 | | | ioffset = ioffset + 4; |
| 5326 | | | ns.secs = tvb_get_letohl(tvb, ioffset); |
| 5327 | | | ns.nsecs = 0; |
| 5328 | | | proto_tree_add_time_format(ntree, hf_es_seconds, tvb, ioffset, |
| 5329 | | | 4, &ns, "Creation Time: %s", abs_time_to_str(&ns)); |
| 5330 | | | ioffset = ioffset + 4; |
| 5331 | | | replica_num = tvb_get_letohs(tvb, ioffset); |
| 5332 | | | proto_tree_add_item(ntree, hf_nds_replica_num, tvb, ioffset, |
| 5333 | | | 2, replica_num); |
| 5334 | | | ioffset = ioffset + 2; |
| 5335 | | | event_num = tvb_get_letohs(tvb, ioffset); |
| 5336 | | | proto_tree_add_item(ntree, hf_nds_event_num, tvb, ioffset, |
| 5337 | | | 2, event_num); |
| 5338 | | | ioffset = ioffset + 2; |
| 5339 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5340 | | | proto_tree_add_uint(ntree, hf_nds_value_len, tvb, ioffset, |
| 5341 | | | 4, value1); |
| 5342 | | | ioffset = ioffset + 4; |
| 5343 | | | } |
| 5344 | | | } |
| 5345 | | | break; |
| 5346 | | | default: |
| 5347 | | | break; |
| 5348 | | | } |
| 5349 | | | break; |
| 5350 | | | |
| 5351 | | | case MVTYPE_ATTR_REQUEST2: |
| 5352 | | | oldioffset = 0; |
| 5353 | | | for (i = 1 ; i <= values->vvalue; i++ ) |
| 5354 | | | { |
| 5355 | | | if (oldioffset >= ioffset) { |
| 5356 | | | proto_tree_add_text(ntree, tvb, 0, 0, "[ Invalid offset: %u ]", ioffset); |
| 5357 | | | THROW(ReportedBoundsError);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
223 | #define THROW(x) \ |
224 | except_throw(XCEPT_GROUP_WIRESHARK, (x), NULL) |
| |
|
| 5358 | | | } |
| 5359 | | | oldioffset = ioffset; |
| 5360 | | | ioffset += align_4(tvb, ioffset); |
| 5361 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5362 | | | proto_tree_add_uint_format(ntree, hf_nds_uint32value, tvb, ioffset, |
| 5363 | | | 4, value1, "Value %d", value1); |
| 5364 | | | ioffset = ioffset + value1; |
| 5365 | | | } |
| 5366 | | | break; |
| 5367 | | | |
| 5368 | | | case MVTYPE_ADD_ATTR_REQUEST: |
| 5369 | | | for (i = 1 ; i <= values->vvalue; i++ ) |
| 5370 | | | { |
| 5371 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5372 | | | ioffset = ioffset + 4; |
| 5373 | | | values->vstring = get_string(tvb, ioffset, value1); |
| 5374 | | | proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset, |
| 5375 | | | value1, values->vstring); |
| 5376 | | | ioffset = ioffset + value1; |
| 5377 | | | ioffset += align_4(tvb, ioffset); |
| 5378 | | | values->voffset = ioffset; |
| 5379 | | | print_nds_values(ntree, tvb, 9, values); |
| 5380 | | | ioffset = values->voffset; |
| 5381 | | | } |
| 5382 | | | break; |
| 5383 | | | |
| 5384 | | | case MVTYPE_READ_CLASS_REQ: |
| 5385 | | | for (i = 1 ; i <= values->vvalue; i++ ) |
| 5386 | | | { |
| 5387 | | | ioffset += align_4(tvb, ioffset); |
| 5388 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5389 | | | ioffset = ioffset + 4; |
| 5390 | | | values->vstring = get_string(tvb, ioffset, value1); |
| 5391 | | | proto_tree_add_string(ntree, hf_nds_base, tvb, ioffset, |
| 5392 | | | value1, values->vstring); |
| 5393 | | | values->mvtype = MVTYPE_ATTR_REQUEST; |
| 5394 | | | ioffset = ioffset + value1; |
| 5395 | | | } |
| 5396 | | | break; |
| 5397 | | | |
| 5398 | | | case MVTYPE_READ_REPLICAS: |
| 5399 | | | for (i = 1 ; i <= values->vvalue; i++ ) |
| 5400 | | | { |
| 5401 | | | bvalue = 0x00000001; |
| 5402 | | | |
| 5403 | | | for (r = 0 ; r < 9; r++ ) |
| 5404 | | | { |
| 5405 | | | if (values->vflags & bvalue) |
| 5406 | | | { |
| 5407 | | | switch(bvalue) |
| 5408 | | | { |
| 5409 | | | case 0x00000001: |
| 5410 | | | temp_values.vvalue = tvb_get_letohl(tvb, ioffset); |
| 5411 | | | temp_values.vlength = 2; |
| 5412 | | | temp_values.hfname = hf_nds_rflags; |
| 5413 | | | temp_values.voffset = ioffset; |
| 5414 | | | temp_values.vdesc = "Output Flags"; |
| 5415 | | | temp_values.bit1 = values->bit1; |
| 5416 | | | temp_values.bit1hfname = hf_bit1outflags; |
| 5417 | | | temp_values.bit2 = values->bit2; |
| 5418 | | | temp_values.bit2hfname = hf_bit2outflags; |
| 5419 | | | temp_values.bit3 = values->bit3; |
| 5420 | | | temp_values.bit3hfname = hf_bit3outflags; |
| 5421 | | | temp_values.bit4 = values->bit4; |
| 5422 | | | temp_values.bit4hfname = hf_bit4outflags; |
| 5423 | | | temp_values.bit5 = values->bit5; |
| 5424 | | | temp_values.bit5hfname = hf_bit5outflags; |
| 5425 | | | temp_values.bit6 = values->bit6; |
| 5426 | | | temp_values.bit6hfname = hf_bit6outflags; |
| 5427 | | | temp_values.bit7 = values->bit7; |
| 5428 | | | temp_values.bit7hfname = hf_bit7outflags; |
| 5429 | | | temp_values.bit8 = values->bit8; |
| 5430 | | | temp_values.bit8hfname = hf_bit8outflags; |
| 5431 | | | temp_values.bit9 = values->bit9; |
| 5432 | | | temp_values.bit9hfname = hf_bit9outflags; |
| 5433 | | | temp_values.bit10 = "Not Defined"; |
| 5434 | | | temp_values.bit10hfname = hf_bit10outflags; |
| 5435 | | | temp_values.bit11 = "Not Defined"; |
| 5436 | | | temp_values.bit11hfname = hf_bit11outflags; |
| 5437 | | | temp_values.bit12 = "Not Defined"; |
| 5438 | | | temp_values.bit12hfname = hf_bit12outflags; |
| 5439 | | | temp_values.bit13 = "Not Defined"; |
| 5440 | | | temp_values.bit13hfname = hf_bit13outflags; |
| 5441 | | | temp_values.bit14 = "Not Defined"; |
| 5442 | | | temp_values.bit14hfname = hf_bit14outflags; |
| 5443 | | | temp_values.bit15 = "Not Defined"; |
| 5444 | | | temp_values.bit15hfname = hf_bit15outflags; |
| 5445 | | | temp_values.bit16 = "Not Defined"; |
| 5446 | | | temp_values.bit16hfname = hf_bit16outflags; |
| 5447 | | | process_bitfield(ntree, tvb, &temp_values); |
| 5448 | | | ioffset = ioffset + 4; |
| 5449 | | | break; |
| 5450 | | | case 0x00000002: |
| 5451 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5452 | | | proto_tree_add_uint_format(ntree, hf_nds_eid, tvb, ioffset, |
| 5453 | | | 4, value1, "Entry ID %08x", value1); |
| 5454 | | | ioffset = ioffset + 4; |
| 5455 | | | break; |
| 5456 | | | case 0x00000004: |
| 5457 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5458 | | | temp_values.vstring = (char *)match_strval(value1, nds_replica_state); |
| 5459 | | | if (temp_values.vstring == NULL) |
| 5460 | | | { |
| 5461 | | | temp_values.vstring = "No Replica State Found"; |
| 5462 | | | } |
| 5463 | | | proto_tree_add_string(ntree, hf_replica_state, tvb, ioffset, |
| 5464 | | | 4, temp_values.vstring); |
| 5465 | | | ioffset = ioffset + 4; |
| 5466 | | | break; |
| 5467 | | | case 0x0000008: |
| 5468 | | | ns.secs = tvb_get_letohl(tvb, ioffset); |
| 5469 | | | ns.nsecs = 0; |
| 5470 | | | proto_tree_add_time_format(ntree, hf_es_seconds, tvb, ioffset, |
| 5471 | | | 4, &ns, "Modification Timestamp: %s", abs_time_to_str(&ns)); |
| 5472 | | | ioffset = ioffset + 4; |
| 5473 | | | replica_num = tvb_get_letohs(tvb, ioffset); |
| 5474 | | | proto_tree_add_item(ntree, hf_nds_replica_num, tvb, ioffset, |
| 5475 | | | 2, replica_num); |
| 5476 | | | ioffset = ioffset + 2; |
| 5477 | | | event_num = tvb_get_letohs(tvb, ioffset); |
| 5478 | | | proto_tree_add_item(ntree, hf_nds_event_num, tvb, ioffset, |
| 5479 | | | 2, event_num); |
| 5480 | | | ioffset = ioffset + 2; |
| 5481 | | | break; |
| 5482 | | | case 0x00000010: |
| 5483 | | | ns.secs = tvb_get_letohl(tvb, ioffset); |
| 5484 | | | ns.nsecs = 0; |
| 5485 | | | proto_tree_add_time_format(ntree, hf_nds_purge, tvb, ioffset, |
| 5486 | | | 4, &ns, "Purge Time: %s", abs_time_to_str(&ns)); |
| 5487 | | | ioffset = ioffset + 4; |
| 5488 | | | break; |
| 5489 | | | case 0x00000020: |
| 5490 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5491 | | | proto_tree_add_uint_format(ntree, hf_nds_local_partition, tvb, ioffset, |
| 5492 | | | 4, value1, "Local Partition ID %08x", value1); |
| 5493 | | | ioffset = ioffset + 4; |
| 5494 | | | break; |
| 5495 | | | case 0x00000040: |
| 5496 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5497 | | | ioffset = ioffset + 4; |
| 5498 | | | temp_values.vstring = get_string(tvb, ioffset, value1); |
| 5499 | | | proto_tree_add_string(ntree, hf_nds_name, tvb, ioffset, |
| 5500 | | | value1, temp_values.vstring); |
| 5501 | | | ioffset = ioffset + value1; |
| 5502 | | | break; |
| 5503 | | | case 0x00000080: |
| 5504 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5505 | | | value2 = value1 & 0x00ff; |
| 5506 | | | temp_values.vstring = (char *)match_strval(value2, nds_replica_type); |
| 5507 | | | if (temp_values.vstring == NULL) |
| 5508 | | | { |
| 5509 | | | temp_values.vstring = "No Replica Type Found"; |
| 5510 | | | } |
| 5511 | | | proto_tree_add_string(ntree, hf_replica_type, tvb, ioffset, |
| 5512 | | | 4, temp_values.vstring); |
| 5513 | | | value3 = value1 & 0xff00; |
| 5514 | | | temp_values.vstring = (char *)match_strval(value3, nds_replica_state); |
| 5515 | | | if (temp_values.vstring == NULL) |
| 5516 | | | { |
| 5517 | | | temp_values.vstring = "No Replica State Found"; |
| 5518 | | | } |
| 5519 | | | proto_tree_add_string(ntree, hf_replica_state, tvb, ioffset, |
| 5520 | | | 4, temp_values.vstring); |
| 5521 | | | ioffset = ioffset + 4; |
| 5522 | | | break; |
| 5523 | | | case 0x00000100: |
| 5524 | | | value1 = tvb_get_letohs(tvb, ioffset); |
| 5525 | | | proto_tree_add_boolean(ntree, hf_partition_busy, tvb, ioffset, 4, value1); |
| 5526 | | | ioffset += 4; |
| 5527 | | | break; |
| 5528 | | | default: |
| 5529 | | | break; |
| 5530 | | | } |
| 5531 | | | } |
| 5532 | | | bvalue = bvalue*2; |
| 5533 | | | ioffset += align_4(tvb, ioffset); |
| 5534 | | | if(tvb_length_remaining(tvb, ioffset) < 4 ) |
| 5535 | | | { |
| 5536 | | | break; |
| 5537 | | | } |
| 5538 | | | } |
| 5539 | | | if(tvb_length_remaining(tvb, ioffset) < 4 ) |
| 5540 | | | { |
| 5541 | | | break; |
| 5542 | | | } |
| 5543 | | | } |
| 5544 | | | break; |
| 5545 | | | |
| 5546 | | | case MVTYPE_MODIFY_ATTR_REQUEST: |
| 5547 | | | for (i = 0 ; i < values->vvalue; i++ ) |
| 5548 | | | { |
| 5549 | | | ioffset += align_4(tvb, ioffset); |
| 5550 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5551 | | | valuestr = match_strval(value1, nds_kind_of_changes); |
| 5552 | | | if (valuestr == NULL) |
| 5553 | | | { |
| 5554 | | | valuestr="(Kind Change Not Found)"; |
| 5555 | | | } |
| 5556 | | | tvb_ensure_bytes_exist(tvb, ioffset, values->vlength); |
| 5557 | | | proto_tree_add_uint_format(ntree, hf_nds_uint32value, tvb, ioffset, |
| 5558 | | | values->vlength, value1, valuestr, value1); |
| 5559 | | | ioffset = ioffset+4; |
| 5560 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 5561 | | | ioffset = ioffset + 4; |
| 5562 | | | temp_values.vstring = get_string(tvb, ioffset, value2); |
| 5563 | | | proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset, |
| 5564 | | | value2, temp_values.vstring); |
| 5565 | | | ioffset = ioffset + value2; |
| 5566 | | | ioffset += align_4(tvb, ioffset); |
| 5567 | | | if(value1 != 1 && value1 != 6) |
| 5568 | | | { |
| 5569 | | | values->voffset = ioffset; |
| 5570 | | | |
| 5571 | | | print_nds_values(ntree, tvb, 9, values); |
| 5572 | | | ioffset = values->voffset; |
| 5573 | | | } |
| 5574 | | | } |
| 5575 | | | break; |
| 5576 | | | |
| 5577 | | | case MVTYPE_ADDR_REFERRAL_REQUEST: |
| 5578 | | | for (i = 0 ; i < values->vvalue; i++ ) |
| 5579 | | | { |
| 5580 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5581 | | | valuestr = match_strval(value1, nds_protocol_type); |
| 5582 | | | if (valuestr == NULL) |
| 5583 | | | { |
| 5584 | | | valuestr="(Undefined Protocol)"; |
| 5585 | | | } |
| 5586 | | | tvb_ensure_bytes_exist(tvb, ioffset, values->vlength); |
| 5587 | | | proto_tree_add_uint_format(ntree, hf_nds_uint32value, tvb, ioffset, |
| 5588 | | | values->vlength, value1, valuestr, value1); |
Format String
proto_tree_add_uint_format() is being called with a format string that is not constant. The format string (seventh argument) may not match the other arguments to proto_tree_add_uint_format(); this could lead to security or stability problems. proto_tree_add_uint_format() is usually called with strings that look like format strings in this project. |
|
| 5589 | | | ioffset = ioffset+4; |
| 5590 | | | } |
| 5591 | | | break; |
| 5592 | | | |
| 5593 | | | case MVTYPE_ADDR_REFERRAL_REPLY: |
| 5594 | | | number_of_referrals = values->vvalue; |
| 5595 | | | |
| 5596 | | | for (r = 1 ; r <= number_of_referrals; r++ ) |
| 5597 | | | { |
| 5598 | | | aitem = proto_tree_add_uint_format(ntree, hf_referral_record, tvb, 6, 0, |
| 5599 | | | r, "NDS Referral Record #%u", r); |
| 5600 | | | atree = proto_item_add_subtree(aitem, ett_nds); |
| 5601 | | | |
| 5602 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5603 | | | |
| 5604 | | | proto_tree_add_uint_format(atree, hf_referral_addcount, tvb, ioffset, 4, |
| 5605 | | | value1, "Number of Addresses in Referral - %u", value1); |
| 5606 | | | |
| 5607 | | | ioffset = ioffset + 4; |
| 5608 | | | for (i = 1 ; i <= value1; i++ ) |
| 5609 | | | { |
| 5610 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 5611 | | | valuestr = match_strval(value2, nds_protocol_type); |
| 5612 | | | if (valuestr == NULL) |
| 5613 | | | { |
| 5614 | | | valuestr="(Undefined Protocol)"; |
| 5615 | | | } |
| 5616 | | | tvb_ensure_bytes_exist(tvb, ioffset, values->vlength); |
| 5617 | | | proto_tree_add_uint_format(atree, hf_nds_uint32value, tvb, ioffset, |
| 5618 | | | values->vlength, value2, valuestr, value2); |
| 5619 | | | ioffset = ioffset+4; |
| 5620 | | | value3 = tvb_get_letohl(tvb, ioffset); |
| 5621 | | | ioffset = ioffset+4; |
| 5622 | | | switch (value2) |
| 5623 | | | { |
| 5624 | | | case NDS_PTYPE_IPX: |
| 5625 | | | proto_tree_add_item(atree, hf_nds_net, tvb, ioffset, 4, FALSE); |
| 5626 | | | proto_tree_add_item(atree, hf_nds_node, tvb, ioffset+4, 6, FALSE); |
| 5627 | | | proto_tree_add_item(atree, hf_nds_socket, tvb, ioffset+10, 2, FALSE); |
| 5628 | | | break; |
| 5629 | | | case NDS_PTYPE_IP: |
| 5630 | | | proto_tree_add_item(atree, hf_nds_port, tvb, ioffset, 2, FALSE); |
| 5631 | | | proto_tree_add_item(atree, hf_add_ref_ip, tvb, ioffset+2, 4, FALSE); |
| 5632 | | | break; |
| 5633 | | | case NDS_PTYPE_UDP: |
| 5634 | | | proto_tree_add_item(atree, hf_nds_port, tvb, ioffset, 2, FALSE); |
| 5635 | | | proto_tree_add_item(atree, hf_add_ref_udp, tvb, ioffset+2, 4, FALSE); |
| 5636 | | | break; |
| 5637 | | | case NDS_PTYPE_TCP: |
| 5638 | | | proto_tree_add_item(atree, hf_nds_port, tvb, ioffset, 2, FALSE); |
| 5639 | | | proto_tree_add_item(atree, hf_add_ref_tcp, tvb, ioffset+2, 4, FALSE); |
| 5640 | | | break; |
| 5641 | | | case NDS_PTYPE_URL: |
| 5642 | | | case NDS_PTYPE_DNS: |
| 5643 | | | values->vstring = get_string(tvb, ioffset, value3); |
| 5644 | | | proto_tree_add_string(atree, hf_value_string, tvb, ioffset, |
| 5645 | | | value3, values->vstring); |
| 5646 | | | break; |
| 5647 | | | default: |
| 5648 | | | break; |
| 5649 | | | } |
| 5650 | | | ioffset = ioffset + value3; |
| 5651 | | | ioffset += align_4(tvb, ioffset); |
| 5652 | | | } |
| 5653 | | | |
| 5654 | | | } |
| 5655 | | | break; |
| 5656 | | | |
| 5657 | | | case MVTYPE_LOC_ADDR_REFERRAL_REPLY: |
| 5658 | | | number_of_referrals = values->vvalue; |
| 5659 | | | |
| 5660 | | | for (r = 1 ; r <= number_of_referrals; r++ ) |
| 5661 | | | { |
| 5662 | | | aitem = proto_tree_add_uint_format(ntree, hf_referral_record, tvb, 6, 0, |
| 5663 | | | r, "NDS Referral Record #%u", r); |
| 5664 | | | atree = proto_item_add_subtree(aitem, ett_nds); |
| 5665 | | | |
| 5666 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 5667 | | | valuestr = match_strval(value2, nds_protocol_type); |
| 5668 | | | if (valuestr == NULL) |
| 5669 | | | { |
| 5670 | | | valuestr="(Undefined Protocol)"; |
| 5671 | | | } |
| 5672 | | | tvb_ensure_bytes_exist(tvb, ioffset, values->vlength); |
| 5673 | | | proto_tree_add_uint_format(atree, hf_nds_uint32value, tvb, ioffset, |
| 5674 | | | values->vlength, value2, valuestr, value2); |
| 5675 | | | ioffset = ioffset+4; |
| 5676 | | | value3 = tvb_get_letohl(tvb, ioffset); |
| 5677 | | | ioffset = ioffset+4; |
| 5678 | | | |
| 5679 | | | switch (value2) |
| 5680 | | | { |
| 5681 | | | case NDS_PTYPE_IPX: |
| 5682 | | | proto_tree_add_item(atree, hf_nds_net, tvb, ioffset, 4, FALSE); |
| 5683 | | | proto_tree_add_item(atree, hf_nds_node, tvb, ioffset+4, 6, FALSE); |
| 5684 | | | proto_tree_add_item(atree, hf_nds_socket, tvb, ioffset+10, 2, FALSE); |
| 5685 | | | break; |
| 5686 | | | case NDS_PTYPE_IP: |
| 5687 | | | proto_tree_add_item(atree, hf_nds_port, tvb, ioffset, 2, FALSE); |
| 5688 | | | proto_tree_add_item(atree, hf_add_ref_ip, tvb, ioffset+2, 4, FALSE); |
| 5689 | | | break; |
| 5690 | | | case NDS_PTYPE_UDP: |
| 5691 | | | proto_tree_add_item(atree, hf_nds_port, tvb, ioffset, 2, FALSE); |
| 5692 | | | proto_tree_add_item(atree, hf_add_ref_udp, tvb, ioffset+2, 4, FALSE); |
| 5693 | | | break; |
| 5694 | | | case NDS_PTYPE_TCP: |
| 5695 | | | proto_tree_add_item(atree, hf_nds_port, tvb, ioffset, 2, FALSE); |
| 5696 | | | proto_tree_add_item(atree, hf_add_ref_tcp, tvb, ioffset+2, 4, FALSE); |
| 5697 | | | break; |
| 5698 | | | case NDS_PTYPE_URL: |
| 5699 | | | case NDS_PTYPE_DNS: |
| 5700 | | | values->vstring = get_string(tvb, ioffset, value3); |
| 5701 | | | proto_tree_add_string(atree, hf_value_string, tvb, ioffset, |
| 5702 | | | value3, values->vstring); |
| 5703 | | | break; |
| 5704 | | | default: |
| 5705 | | | break; |
| 5706 | | | } |
| 5707 | | | ioffset = ioffset + value3; |
| 5708 | | | ioffset += align_4(tvb, ioffset); |
| 5709 | | | } |
| 5710 | | | break; |
| 5711 | | | |
| 5712 | | | case MVTYPE_PROC_ENTRY_SPECIFIERS: |
| 5713 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 5714 | | | values->vstring = (char *)match_strval(value2, es_type); |
| 5715 | | | if (values->vstring == NULL) |
| 5716 | | | { |
| 5717 | | | values->vstring = "No ES Type Found"; |
| 5718 | | | } |
| 5719 | | | esitem = proto_tree_add_string_format(ntree, hf_es_type, tvb, ioffset, |
| 5720 | | | 4, values->vstring, "Output Entry Specifier - %s", values->vstring); |
| 5721 | | | estree = proto_item_add_subtree(esitem, ett_nds); |
| 5722 | | | ioffset = ioffset + 4; |
| 5723 | | | ioffset = print_es_type(estree, tvb, values, value2, ioffset); |
| 5724 | | | value3 = tvb_get_letohl(tvb, ioffset); |
| 5725 | | | values->vstring = (char *)match_strval(value3, es_type); |
| 5726 | | | if (values->vstring == NULL) |
| 5727 | | | { |
| 5728 | | | values->vstring = "No ES Type Found"; |
| 5729 | | | } |
| 5730 | | | esitem = proto_tree_add_string_format(ntree, hf_es_type, tvb, ioffset, |
| 5731 | | | 4, values->vstring, "Input Entry Specifier - %s", values->vstring); |
| 5732 | | | estree = proto_item_add_subtree(esitem, ett_nds); |
| 5733 | | | ioffset = ioffset + 4; |
| 5734 | | | ioffset = print_es_type(estree, tvb, values, value3, ioffset); |
| 5735 | | | |
| 5736 | | | g_strlcpy(mv_resolve_name_string, values->vstring, 128); |
| 5737 | | | value4 = tvb_get_letohl(tvb, ioffset); |
| 5738 | | | aitem = proto_tree_add_uint_format(ntree, hf_referral_record, tvb, ioffset, 4, |
| 5739 | | | value4, "Referral Protocols - %u", value4); |
| 5740 | | | atree = proto_item_add_subtree(aitem, ett_nds); |
| 5741 | | | ioffset += 4; |
| 5742 | | | for (i = 0 ; i < value4; i++ ) |
| 5743 | | | { |
| 5744 | | | value5 = tvb_get_letohl(tvb, ioffset); |
| 5745 | | | valuestr = match_strval(value5, nds_protocol_type); |
| 5746 | | | if (valuestr == NULL) |
| 5747 | | | { |
| 5748 | | | valuestr="(Undefined Protocol)"; |
| 5749 | | | } |
| 5750 | | | proto_tree_add_string_format(atree, hf_value_string, tvb, ioffset, |
| 5751 | | | 4, valuestr, "Protocol -> %s", valuestr); |
| 5752 | | | ioffset = ioffset+4; |
| 5753 | | | } |
| 5754 | | | value6 = tvb_get_letohl(tvb, ioffset); |
| 5755 | | | aitem = proto_tree_add_uint_format(ntree, hf_referral_record, tvb, ioffset, 4, |
| 5756 | | | value6, "Tree Walking Protocols - %u", value6); |
| 5757 | | | atree = proto_item_add_subtree(aitem, ett_nds); |
| 5758 | | | ioffset += 4; |
| 5759 | | | for (i = 0 ; i < value6; i++ ) |
| 5760 | | | { |
| 5761 | | | value7 = tvb_get_letohl(tvb, ioffset); |
| 5762 | | | valuestr = match_strval(value7, nds_protocol_type); |
| 5763 | | | if (valuestr == NULL) |
| 5764 | | | { |
| 5765 | | | valuestr="(Undefined Protocol)"; |
| 5766 | | | } |
| 5767 | | | proto_tree_add_string_format(atree, hf_value_string, tvb, ioffset, |
| 5768 | | | 4, valuestr, "Protocol -> %s", valuestr); |
| 5769 | | | ioffset = ioffset+4; |
| 5770 | | | } |
| 5771 | | | values->vstring = " "; |
| 5772 | | | break; |
| 5773 | | | |
| 5774 | | | case MVTYPE_PRINT_TIMESTAMP: |
| 5775 | | | replica_num = tvb_get_letohs(tvb, ioffset); |
| 5776 | | | proto_tree_add_item(ncp_tree, hf_nds_replica_num, tvb, ioffset, |
| 5777 | | | 2, replica_num); |
| 5778 | | | ioffset = ioffset + 2; |
| 5779 | | | event_num = tvb_get_letohs(tvb, ioffset); |
| 5780 | | | proto_tree_add_item(ncp_tree, hf_nds_event_num, tvb, ioffset, |
| 5781 | | | 2, event_num); |
| 5782 | | | ioffset = ioffset + 2; |
| 5783 | | | |
| 5784 | | | |
| 5785 | | | case MVTYPE_LIST_PARTITIONS: |
| 5786 | | | number_of_referrals = values->vvalue; |
| 5787 | | | |
| 5788 | | | |
| 5789 | | | |
| 5790 | | | if (number_of_referrals > 256) { |
| 5791 | | | proto_tree_add_text(ntree, tvb, 0, 0, "[ Bad referal at offset: %u ]", ioffset); |
| 5792 | | | THROW(ReportedBoundsError);
x /home/sate/Testcases/c/cve/wireshark-1.2.0/epan/exceptions.h |
| |
223 | #define THROW(x) \ |
224 | except_throw(XCEPT_GROUP_WIRESHARK, (x), NULL) |
| |
|
| 5793 | | | break; |
| 5794 | | | } |
| 5795 | | | for (i = 0; i < number_of_referrals; i++) |
| 5796 | | | { |
| 5797 | | | bvalue = 0x00000001; |
| 5798 | | | |
| 5799 | | | for (r = 0 ; r < 32; r++ ) |
| 5800 | | | { |
| 5801 | | | oldioffset = ioffset; |
| 5802 | | | if (values->vflags & bvalue) |
| 5803 | | | { |
| 5804 | | | switch(bvalue) |
| 5805 | | | { |
| 5806 | | | case 0x00000001: |
| 5807 | | | temp_values.vvalue = tvb_get_letohs(tvb, ioffset); |
| 5808 | | | temp_values.vtype = VTYPE_BITFIELD; |
| 5809 | | | temp_values.vdesc = "Information Flags (low) Byte:"; |
| 5810 | | | temp_values.vlength = 2; |
| 5811 | | | temp_values.hfname= hf_nds_rflags; |
| 5812 | | | temp_values.voffset = ioffset; |
| 5813 | | | temp_values.bit1 = "Output Flags"; |
| 5814 | | | temp_values.bit1hfname = hf_bit1infoflagsl; |
| 5815 | | | temp_values.bit2 = "Entry ID"; |
| 5816 | | | temp_values.bit2hfname = hf_bit2infoflagsl; |
| 5817 | | | temp_values.bit3 = "Entry Flags"; |
| 5818 | | | temp_values.bit3hfname = hf_bit3infoflagsl; |
| 5819 | | | temp_values.bit4 = "Subordinate Count"; |
| 5820 | | | temp_values.bit4hfname = hf_bit4infoflagsl; |
| 5821 | | | temp_values.bit5 = "Modification Time"; |
| 5822 | | | temp_values.bit5hfname = hf_bit5infoflagsl; |
| 5823 | | | temp_values.bit6 = "Modification Timestamp"; |
| 5824 | | | temp_values.bit6hfname = hf_bit6infoflagsl; |
| 5825 | | | temp_values.bit7 = "Creation Timestamp"; |
| 5826 | | | temp_values.bit7hfname = hf_bit7infoflagsl; |
| 5827 | | | temp_values.bit8 = "Partition Root ID"; |
| 5828 | | | temp_values.bit8hfname = hf_bit8infoflagsl; |
| 5829 | | | temp_values.bit9 = "Parent ID"; |
| 5830 | | | temp_values.bit9hfname = hf_bit9infoflagsl; |
| 5831 | | | temp_values.bit10 = "Revision Count"; |
| 5832 | | | temp_values.bit10hfname = hf_bit10infoflagsl; |
| 5833 | | | temp_values.bit11 = "Replica Type"; |
| 5834 | | | temp_values.bit11hfname = hf_bit11infoflagsl; |
| 5835 | | | temp_values.bit12 = "Base Class"; |
| 5836 | | | temp_values.bit12hfname = hf_bit12infoflagsl; |
| 5837 | | | temp_values.bit13 = "Relative Distinguished Name"; |
| 5838 | | | temp_values.bit13hfname = hf_bit13infoflagsl; |
| 5839 | | | temp_values.bit14 = "Distinguished Name"; |
| 5840 | | | temp_values.bit14hfname = hf_bit14infoflagsl; |
| 5841 | | | temp_values.bit15 = "Root Distinguished Name"; |
| 5842 | | | temp_values.bit15hfname = hf_bit15infoflagsl; |
| 5843 | | | temp_values.bit16 = "Parent Distinguished Name"; |
| 5844 | | | temp_values.bit16hfname = hf_bit16infoflagsl; |
| 5845 | | | process_bitfield(ntree, tvb, &temp_values); |
| 5846 | | | ioffset = ioffset+2; |
| 5847 | | | temp_values.vvalue = tvb_get_letohs(tvb, ioffset); |
| 5848 | | | temp_values.vtype = VTYPE_BITFIELD; |
| 5849 | | | temp_values.vdesc = "Information Flags (high) Byte:"; |
| 5850 | | | temp_values.vlength = 2; |
| 5851 | | | temp_values.hfname= hf_nds_rflags; |
| 5852 | | | temp_values.voffset = ioffset; |
| 5853 | | | temp_values.bit1 = "Purge Time"; |
| 5854 | | | temp_values.bit1hfname = hf_bit1infoflagsh; |
| 5855 | | | temp_values.bit2 = "Dereference Base Class"; |
| 5856 | | | temp_values.bit2hfname = hf_bit2infoflagsh; |
| 5857 | | | temp_values.bit3 = "Not Defined"; |
| 5858 | | | temp_values.bit3hfname = hf_bit3infoflagsh; |
| 5859 | | | temp_values.bit4 = "Not Defined"; |
| 5860 | | | temp_values.bit4hfname = hf_bit4infoflagsh; |
| 5861 | | | temp_values.bit5 = "Not Defined"; |
| 5862 | | | temp_values.bit5hfname = hf_bit5infoflagsh; |
| 5863 | | | temp_values.bit6 = "Not Defined"; |
| 5864 | | | temp_values.bit6hfname = hf_bit6infoflagsh; |
| 5865 | | | temp_values.bit7 = "Not Defined"; |
| 5866 | | | temp_values.bit7hfname = hf_bit7infoflagsh; |
| 5867 | | | temp_values.bit8 = "Not Defined"; |
| 5868 | | | temp_values.bit8hfname = hf_bit8infoflagsh; |
| 5869 | | | temp_values.bit9 = "Not Defined"; |
| 5870 | | | temp_values.bit9hfname = hf_bit9infoflagsh; |
| 5871 | | | temp_values.bit10 = "Not Defined"; |
| 5872 | | | temp_values.bit10hfname = hf_bit10infoflagsh; |
| 5873 | | | temp_values.bit11 = "Not Defined"; |
| 5874 | | | temp_values.bit11hfname = hf_bit11infoflagsh; |
| 5875 | | | temp_values.bit12 = "Not Defined"; |
| 5876 | | | temp_values.bit12hfname = hf_bit12infoflagsh; |
| 5877 | | | temp_values.bit13 = "Not Defined"; |
| 5878 | | | temp_values.bit13hfname = hf_bit13infoflagsh; |
| 5879 | | | temp_values.bit14 = "Not Defined"; |
| 5880 | | | temp_values.bit14hfname = hf_bit14infoflagsh; |
| 5881 | | | temp_values.bit15 = "Not Defined"; |
| 5882 | | | temp_values.bit15hfname = hf_bit15infoflagsh; |
| 5883 | | | temp_values.bit16 = "Not Defined"; |
| 5884 | | | temp_values.bit16hfname = hf_bit16infoflagsh; |
| 5885 | | | process_bitfield(ntree, tvb, &temp_values); |
| 5886 | | | ioffset = ioffset+2; |
| 5887 | | | break; |
| 5888 | | | case 0x00000002: |
| 5889 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5890 | | | proto_tree_add_uint_format(ntree, hf_nds_eid, tvb, ioffset, |
| 5891 | | | 4, value1, "Entry ID %08x", value1); |
| 5892 | | | ioffset = ioffset + 4; |
| 5893 | | | break; |
| 5894 | | | case 0x00000004: |
| 5895 | | | temp_values.vvalue = tvb_get_letohl(tvb, ioffset); |
| 5896 | | | temp_values.vtype = VTYPE_BITFIELD; |
| 5897 | | | temp_values.vdesc = "Entry Flags:"; |
| 5898 | | | temp_values.vlength = 2; |
| 5899 | | | temp_values.hfname= hf_nds_eflags; |
| 5900 | | | temp_values.voffset = ioffset; |
| 5901 | | | temp_values.bit1 = "Alias Entry"; |
| 5902 | | | temp_values.bit1hfname = hf_bit1eflags; |
| 5903 | | | temp_values.bit2 = "Partition Root"; |
| 5904 | | | temp_values.bit2hfname = hf_bit2eflags; |
| 5905 | | | temp_values.bit3 = "Container Entry"; |
| 5906 | | | temp_values.bit3hfname = hf_bit3eflags; |
| 5907 | | | temp_values.bit4 = "Container Alias"; |
| 5908 | | | temp_values.bit4hfname = hf_bit4eflags; |
| 5909 | | | temp_values.bit5 = "Matches List Filter"; |
| 5910 | | | temp_values.bit5hfname = hf_bit5eflags; |
| 5911 | | | temp_values.bit6 = "Reference Entry"; |
| 5912 | | | temp_values.bit6hfname = hf_bit6eflags; |
| 5913 | | | temp_values.bit7 = "40x Reference Entry"; |
| 5914 | | | temp_values.bit7hfname = hf_bit7eflags; |
| 5915 | | | temp_values.bit8 = "Back Linked"; |
| 5916 | | | temp_values.bit8hfname = hf_bit8eflags; |
| 5917 | | | temp_values.bit9 = "New Entry"; |
| 5918 | | | temp_values.bit9hfname = hf_bit9eflags; |
| 5919 | | | temp_values.bit10 = "Temporary Reference"; |
| 5920 | | | temp_values.bit10hfname = hf_bit10eflags; |
| 5921 | | | temp_values.bit11 = "Audited"; |
| 5922 | | | temp_values.bit11hfname = hf_bit11eflags; |
| 5923 | | | temp_values.bit12 = "Entry Not Present"; |
| 5924 | | | temp_values.bit12hfname = hf_bit12eflags; |
| 5925 | | | temp_values.bit13 = "Entry Verify CTS"; |
| 5926 | | | temp_values.bit13hfname = hf_bit13eflags; |
| 5927 | | | temp_values.bit14 = "Entry Damaged"; |
| 5928 | | | temp_values.bit14hfname = hf_bit14eflags; |
| 5929 | | | temp_values.bit15 = "Not Defined"; |
| 5930 | | | temp_values.bit15hfname = hf_bit15eflags; |
| 5931 | | | temp_values.bit16 = "Not Defined"; |
| 5932 | | | temp_values.bit16hfname = hf_bit16eflags; |
| 5933 | | | process_bitfield(ntree, tvb, &temp_values); |
| 5934 | | | ioffset = ioffset+4; |
| 5935 | | | break; |
| 5936 | | | case 0x0000008: |
| 5937 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5938 | | | proto_tree_add_uint_format(ntree, hf_sub_count, tvb, ioffset, |
| 5939 | | | 4, value1, "Subordinate Count %u", value1); |
| 5940 | | | ioffset = ioffset + 4; |
| 5941 | | | break; |
| 5942 | | | case 0x0000010: |
| 5943 | | | ns.secs = tvb_get_letohl(tvb, ioffset); |
| 5944 | | | ns.nsecs = 0; |
| 5945 | | | proto_tree_add_time_format(ntree, hf_es_seconds, tvb, ioffset, |
| 5946 | | | 4, &ns, "Modification Time: %s", abs_time_to_str(&ns)); |
| 5947 | | | ioffset = ioffset + 4; |
| 5948 | | | break; |
| 5949 | | | case 0x0000020: |
| 5950 | | | ns.secs = tvb_get_letohl(tvb, ioffset); |
| 5951 | | | ns.nsecs = 0; |
| 5952 | | | proto_tree_add_time_format(ntree, hf_es_seconds, tvb, ioffset, |
| 5953 | | | 4, &ns, "Modification Timestamp: %s", abs_time_to_str(&ns)); |
| 5954 | | | ioffset = ioffset + 4; |
| 5955 | | | replica_num = tvb_get_letohs(tvb, ioffset); |
| 5956 | | | proto_tree_add_item(ntree, hf_nds_replica_num, tvb, ioffset, |
| 5957 | | | 2, replica_num); |
| 5958 | | | ioffset = ioffset + 2; |
| 5959 | | | event_num = tvb_get_letohs(tvb, ioffset); |
| 5960 | | | proto_tree_add_item(ntree, hf_nds_event_num, tvb, ioffset, |
| 5961 | | | 2, event_num); |
| 5962 | | | ioffset = ioffset + 2; |
| 5963 | | | break; |
| 5964 | | | case 0x0000040: |
| 5965 | | | ns.secs = tvb_get_letohl(tvb, ioffset); |
| 5966 | | | ns.nsecs = 0; |
| 5967 | | | proto_tree_add_time_format(ntree, hf_es_seconds, tvb, ioffset, |
| 5968 | | | 4, &ns, "Creation Timestamp: %s", abs_time_to_str(&ns)); |
| 5969 | | | ioffset = ioffset + 4; |
| 5970 | | | replica_num = tvb_get_letohs(tvb, ioffset); |
| 5971 | | | proto_tree_add_item(ntree, hf_nds_replica_num, tvb, ioffset, |
| 5972 | | | 2, replica_num); |
| 5973 | | | ioffset = ioffset + 2; |
| 5974 | | | event_num = tvb_get_letohs(tvb, ioffset); |
| 5975 | | | proto_tree_add_item(ntree, hf_nds_event_num, tvb, ioffset, |
| 5976 | | | 2, event_num); |
| 5977 | | | ioffset = ioffset + 2; |
| 5978 | | | break; |
| 5979 | | | case 0x00000080: |
| 5980 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5981 | | | proto_tree_add_uint_format(ntree, hf_nds_partition_root_id, tvb, ioffset, |
| 5982 | | | 4, value1, "Partition Root ID %08x", value1); |
| 5983 | | | ioffset = ioffset + 4; |
| 5984 | | | break; |
| 5985 | | | case 0x00000100: |
| 5986 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5987 | | | proto_tree_add_uint_format(ntree, hf_nds_parent, tvb, ioffset, |
| 5988 | | | 4, value1, "Parent ID %08x", value1); |
| 5989 | | | ioffset = ioffset + 4; |
| 5990 | | | break; |
| 5991 | | | case 0x00000200: |
| 5992 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5993 | | | proto_tree_add_uint_format(ntree, hf_nds_revision, tvb, ioffset, |
| 5994 | | | 4, value1, "Revision Count %u", value1); |
| 5995 | | | ioffset = ioffset + 4; |
| 5996 | | | break; |
| 5997 | | | case 0x00000400: |
| 5998 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 5999 | | | value2 = value1 & 0x00ff; |
| 6000 | | | temp_values.vstring = (char *)match_strval(value2, nds_replica_type); |
| 6001 | | | if (temp_values.vstring == NULL) |
| 6002 | | | { |
| 6003 | | | temp_values.vstring = "No Replica Type Found"; |
| 6004 | | | } |
| 6005 | | | proto_tree_add_string(ntree, hf_replica_type, tvb, ioffset, |
| 6006 | | | 4, temp_values.vstring); |
| 6007 | | | value3 = value1 & 0xff00; |
| 6008 | | | temp_values.vstring = (char *)match_strval(value3, nds_replica_state); |
| 6009 | | | if (temp_values.vstring == NULL) |
| 6010 | | | { |
| 6011 | | | temp_values.vstring = "No Replica State Found"; |
| 6012 | | | } |
| 6013 | | | proto_tree_add_string(ntree, hf_replica_state, tvb, ioffset, |
| 6014 | | | 4, temp_values.vstring); |
| 6015 | | | ioffset = ioffset + 4; |
| 6016 | | | break; |
| 6017 | | | case 0x00000800: |
| 6018 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6019 | | | ioffset = ioffset + 4; |
| 6020 | | | temp_values.vstring = get_string(tvb, ioffset, value1); |
| 6021 | | | proto_tree_add_string(ntree, hf_nds_base, tvb, ioffset, |
| 6022 | | | value1, temp_values.vstring); |
| 6023 | | | ioffset = ioffset + value1; |
| 6024 | | | break; |
| 6025 | | | case 0x00001000: |
| 6026 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6027 | | | ioffset = ioffset + 4; |
| 6028 | | | temp_values.vstring = get_string(tvb, ioffset, value1); |
| 6029 | | | proto_tree_add_string(ntree, hf_nds_relative_dn, tvb, ioffset, |
| 6030 | | | value1, temp_values.vstring); |
| 6031 | | | ioffset = ioffset + value1; |
| 6032 | | | break; |
| 6033 | | | case 0x00002000: |
| 6034 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6035 | | | ioffset = ioffset + 4; |
| 6036 | | | temp_values.vstring = get_string(tvb, ioffset, value1); |
| 6037 | | | proto_tree_add_string(ntree, hf_nds_name, tvb, ioffset, |
| 6038 | | | value1, temp_values.vstring); |
| 6039 | | | ioffset = ioffset + value1; |
| 6040 | | | break; |
| 6041 | | | case 0x00004000: |
| 6042 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6043 | | | ioffset = ioffset + 4; |
| 6044 | | | temp_values.vstring = get_string(tvb, ioffset, value1); |
| 6045 | | | proto_tree_add_string(ntree, hf_nds_name, tvb, ioffset, |
| 6046 | | | value1, temp_values.vstring); |
| 6047 | | | ioffset = ioffset + value1; |
| 6048 | | | break; |
| 6049 | | | case 0x00008000: |
| 6050 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6051 | | | ioffset = ioffset + 4; |
| 6052 | | | temp_values.vstring = get_string(tvb, ioffset, value1); |
| 6053 | | | proto_tree_add_string(ntree, hf_nds_name, tvb, ioffset, |
| 6054 | | | value1, temp_values.vstring); |
| 6055 | | | ioffset = ioffset + value1; |
| 6056 | | | break; |
| 6057 | | | case 0x00010000: |
| 6058 | | | ns.secs = tvb_get_letohl(tvb, ioffset); |
| 6059 | | | ns.nsecs = 0; |
| 6060 | | | proto_tree_add_time_format(ntree, hf_es_seconds, tvb, ioffset, |
| 6061 | | | 4, &ns, "Purge Time: %s", abs_time_to_str(&ns)); |
| 6062 | | | ioffset = ioffset + 4; |
| 6063 | | | break; |
| 6064 | | | case 0x00020000: |
| 6065 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6066 | | | ioffset = ioffset + 4; |
| 6067 | | | temp_values.vstring = get_string(tvb, ioffset, value1); |
| 6068 | | | proto_tree_add_string(ntree, hf_deref_base, tvb, ioffset, |
| 6069 | | | value1, temp_values.vstring); |
| 6070 | | | ioffset = ioffset + value1; |
| 6071 | | | break; |
| 6072 | | | default: |
| 6073 | | | break; |
| 6074 | | | |
| 6075 | | | } |
| 6076 | | | ioffset += align_4(tvb, ioffset); |
| 6077 | | | } |
| 6078 | | | bvalue = bvalue*2; |
| 6079 | | | |
| 6080 | | | |
| 6081 | | | |
| 6082 | | | if (bvalue==0) { |
| 6083 | | | break; |
| 6084 | | | } |
| 6085 | | | if(tvb_length_remaining(tvb, ioffset) < 4 ) |
| 6086 | | | { |
| 6087 | | | break; |
| 6088 | | | } |
| 6089 | | | } |
| 6090 | | | if(tvb_length_remaining(tvb, ioffset) < 4 ) |
| 6091 | | | { |
| 6092 | | | break; |
| 6093 | | | } |
| 6094 | | | } |
| 6095 | | | break; |
| 6096 | | | |
| 6097 | | | case MVTYPE_CLASS_NAMES: |
| 6098 | | | number_of_referrals = values->vvalue; |
| 6099 | | | for (i = 0; i < number_of_referrals; i++) |
| 6100 | | | { |
| 6101 | | | ioffset += align_4(tvb, ioffset); |
| 6102 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6103 | | | ioffset = ioffset + 4; |
| 6104 | | | temp_values.vstring = get_string(tvb, ioffset, value1); |
| 6105 | | | sub1item = proto_tree_add_string(ntree, hf_nds_base_class, tvb, ioffset, |
| 6106 | | | value1, temp_values.vstring); |
| 6107 | | | sub1tree = proto_item_add_subtree(sub1item, ett_nds); |
| 6108 | | | ioffset = ioffset + value1; |
| 6109 | | | ioffset += align_4(tvb, ioffset); |
| 6110 | | | if(values->vflags != 0) |
| 6111 | | | { |
| 6112 | | | temp_values.vvalue = tvb_get_letohl(tvb, ioffset); |
| 6113 | | | temp_values.vtype = VTYPE_BITFIELD; |
| 6114 | | | temp_values.vdesc = "Class Flags:"; |
| 6115 | | | temp_values.vlength = 2; |
| 6116 | | | temp_values.hfname= hf_nds_cflags; |
| 6117 | | | temp_values.voffset = ioffset; |
| 6118 | | | temp_values.bit1 = "Container"; |
| 6119 | | | temp_values.bit1hfname = hf_bit1cflags; |
| 6120 | | | temp_values.bit2 = "Effective"; |
| 6121 | | | temp_values.bit2hfname = hf_bit2cflags; |
| 6122 | | | temp_values.bit3 = "Class Definition Cannot be Removed"; |
| 6123 | | | temp_values.bit3hfname = hf_bit3cflags; |
| 6124 | | | temp_values.bit4 = "Ambiguous Naming"; |
| 6125 | | | temp_values.bit4hfname = hf_bit4cflags; |
| 6126 | | | temp_values.bit5 = "Ambiguous Containment"; |
| 6127 | | | temp_values.bit5hfname = hf_bit5cflags; |
| 6128 | | | temp_values.bit6 = "Auxiliary"; |
| 6129 | | | temp_values.bit6hfname = hf_bit6cflags; |
| 6130 | | | temp_values.bit7 = "Operational"; |
| 6131 | | | temp_values.bit7hfname = hf_bit7cflags; |
| 6132 | | | temp_values.bit8 = "Sparse Required"; |
| 6133 | | | temp_values.bit8hfname = hf_bit8cflags; |
| 6134 | | | temp_values.bit9 = "Sparse Operational"; |
| 6135 | | | temp_values.bit9hfname = hf_bit9cflags; |
| 6136 | | | temp_values.bit10 = "Not Defined"; |
| 6137 | | | temp_values.bit10hfname = hf_bit10cflags; |
| 6138 | | | temp_values.bit11 = "Not Defined"; |
| 6139 | | | temp_values.bit11hfname = hf_bit11cflags; |
| 6140 | | | temp_values.bit12 = "Not Defined"; |
| 6141 | | | temp_values.bit12hfname = hf_bit12cflags; |
| 6142 | | | temp_values.bit13 = "Not Defined"; |
| 6143 | | | temp_values.bit13hfname = hf_bit13cflags; |
| 6144 | | | temp_values.bit14 = "Not Defined"; |
| 6145 | | | temp_values.bit14hfname = hf_bit14cflags; |
| 6146 | | | temp_values.bit15 = "Not Defined"; |
| 6147 | | | temp_values.bit15hfname = hf_bit15cflags; |
| 6148 | | | temp_values.bit16 = "Not Defined"; |
| 6149 | | | temp_values.bit16hfname = hf_bit16cflags; |
| 6150 | | | process_bitfield(sub1tree, tvb, &temp_values); |
| 6151 | | | ioffset = ioffset+4; |
| 6152 | | | if(values->vflags != 5) |
| 6153 | | | { |
| 6154 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6155 | | | length_remaining = tvb_length_remaining(tvb, ioffset); |
| 6156 | | | if(length_remaining == -1 || value1 > (guint32) length_remaining) |
| 6157 | | | { |
| 6158 | | | break; |
| 6159 | | | } |
| 6160 | | | ioffset += 4; |
| 6161 | | | tvb_ensure_bytes_exist(tvb, ioffset, value1); |
| 6162 | | | proto_tree_add_bytes(sub1tree, hf_nds_asn1, tvb, ioffset, value1, tvb_get_ptr(tvb, ioffset, value1)); |
| 6163 | | | ioffset += value1; |
| 6164 | | | ioffset += (value1%2); |
| 6165 | | | } |
| 6166 | | | if(values->vflags == 1 || values->vflags == 2 || values->vflags == 4) |
| 6167 | | | { |
| 6168 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6169 | | | sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_number_of_items, tvb, ioffset, |
| 6170 | | | 4, value1, "Super Classes %u", value1); |
| 6171 | | | sub2tree = proto_item_add_subtree(sub2item, ett_nds); |
| 6172 | | | ioffset = ioffset + 4; |
| 6173 | | | for (r = 0; r < value1; r++) |
| 6174 | | | { |
| 6175 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6176 | | | ioffset = ioffset + 4; |
| 6177 | | | temp_values.vstring = get_string(tvb, ioffset, value2); |
| 6178 | | | proto_tree_add_string(sub2tree, hf_nds_super, tvb, ioffset, |
| 6179 | | | value2, temp_values.vstring); |
| 6180 | | | ioffset = ioffset + value2; |
| 6181 | | | ioffset += align_4(tvb, ioffset); |
| 6182 | | | } |
| 6183 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6184 | | | sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_number_of_items, tvb, ioffset, |
| 6185 | | | 4, value1, "Containment Classes %u", value1); |
| 6186 | | | sub2tree = proto_item_add_subtree(sub2item, ett_nds); |
| 6187 | | | ioffset = ioffset + 4; |
| 6188 | | | for (r = 0; r < value1; r++) |
| 6189 | | | { |
| 6190 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6191 | | | ioffset = ioffset + 4; |
| 6192 | | | temp_values.vstring = get_string(tvb, ioffset, value2); |
| 6193 | | | proto_tree_add_string(sub2tree, hf_nds_base_class, tvb, ioffset, |
| 6194 | | | value2, temp_values.vstring); |
| 6195 | | | ioffset = ioffset + value2; |
| 6196 | | | ioffset += align_4(tvb, ioffset); |
| 6197 | | | } |
| 6198 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6199 | | | sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_number_of_items, tvb, ioffset, |
| 6200 | | | 4, value1, "Naming Attributes %u", value1); |
| 6201 | | | sub2tree = proto_item_add_subtree(sub2item, ett_nds); |
| 6202 | | | ioffset = ioffset + 4; |
| 6203 | | | for (r = 0; r < value1; r++) |
| 6204 | | | { |
| 6205 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6206 | | | ioffset = ioffset + 4; |
| 6207 | | | temp_values.vstring = get_string(tvb, ioffset, value2); |
| 6208 | | | proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset, |
| 6209 | | | value2, temp_values.vstring); |
| 6210 | | | ioffset = ioffset + value2; |
| 6211 | | | ioffset += align_4(tvb, ioffset); |
| 6212 | | | } |
| 6213 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6214 | | | sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_number_of_items, tvb, ioffset, |
| 6215 | | | 4, value1, "Mandatory Attributes %u", value1); |
| 6216 | | | sub2tree = proto_item_add_subtree(sub2item, ett_nds); |
| 6217 | | | ioffset = ioffset + 4; |
| 6218 | | | for (r = 0; r < value1; r++) |
| 6219 | | | { |
| 6220 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6221 | | | ioffset = ioffset + 4; |
| 6222 | | | temp_values.vstring = get_string(tvb, ioffset, value2); |
| 6223 | | | proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset, |
| 6224 | | | value2, temp_values.vstring); |
| 6225 | | | ioffset = ioffset + value2; |
| 6226 | | | ioffset += align_4(tvb, ioffset); |
| 6227 | | | } |
| 6228 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6229 | | | sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_number_of_items, tvb, ioffset, |
| 6230 | | | 4, value1, "Optional Attributes %u", value1); |
| 6231 | | | sub2tree = proto_item_add_subtree(sub2item, ett_nds); |
| 6232 | | | ioffset = ioffset + 4; |
| 6233 | | | for (r = 0; r < value1; r++) |
| 6234 | | | { |
| 6235 | | | ioffset += align_4(tvb, ioffset); |
| 6236 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6237 | | | ioffset = ioffset + 4; |
| 6238 | | | temp_values.vstring = get_string(tvb, ioffset, value2); |
| 6239 | | | proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset, |
| 6240 | | | value2, temp_values.vstring); |
| 6241 | | | ioffset = ioffset + value2; |
| 6242 | | | if(tvb_length_remaining(tvb, ioffset) < 4 ) |
| 6243 | | | { |
| 6244 | | | break; |
| 6245 | | | } |
| 6246 | | | } |
| 6247 | | | } |
| 6248 | | | |
| 6249 | | | if(values->vflags == 4) |
| 6250 | | | { |
| 6251 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6252 | | | sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_number_of_items, tvb, ioffset, |
| 6253 | | | 4, value1, "Containment Classes %u", value1); |
| 6254 | | | sub2tree = proto_item_add_subtree(sub2item, ett_nds); |
| 6255 | | | ioffset = ioffset + 4; |
| 6256 | | | for (r = 0; r < value1; r++) |
| 6257 | | | { |
| 6258 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6259 | | | ioffset = ioffset + 4; |
| 6260 | | | temp_values.vstring = get_string(tvb, ioffset, value2); |
| 6261 | | | proto_tree_add_string(sub2tree, hf_nds_base_class, tvb, ioffset, |
| 6262 | | | value2, temp_values.vstring); |
| 6263 | | | ioffset = ioffset + value2; |
| 6264 | | | ioffset += align_4(tvb, ioffset); |
| 6265 | | | } |
| 6266 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6267 | | | sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_number_of_items, tvb, ioffset, |
| 6268 | | | 4, value1, "Naming Attributes %u", value1); |
| 6269 | | | sub2tree = proto_item_add_subtree(sub2item, ett_nds); |
| 6270 | | | ioffset = ioffset + 4; |
| 6271 | | | for (r = 0; r < value1; r++) |
| 6272 | | | { |
| 6273 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6274 | | | ioffset = ioffset + 4; |
| 6275 | | | temp_values.vstring = get_string(tvb, ioffset, value2); |
| 6276 | | | proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset, |
| 6277 | | | value2, temp_values.vstring); |
| 6278 | | | ioffset = ioffset + value2; |
| 6279 | | | ioffset += align_4(tvb, ioffset); |
| 6280 | | | } |
| 6281 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6282 | | | sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_number_of_items, tvb, ioffset, |
| 6283 | | | 4, value1, "Mandatory Attributes %u", value1); |
| 6284 | | | sub2tree = proto_item_add_subtree(sub2item, ett_nds); |
| 6285 | | | ioffset = ioffset + 4; |
| 6286 | | | for (r = 0; r < value1; r++) |
| 6287 | | | { |
| 6288 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6289 | | | ioffset = ioffset + 4; |
| 6290 | | | temp_values.vstring = get_string(tvb, ioffset, value2); |
| 6291 | | | proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset, |
| 6292 | | | value2, temp_values.vstring); |
| 6293 | | | ioffset = ioffset + value2; |
| 6294 | | | ioffset += align_4(tvb, ioffset); |
| 6295 | | | } |
| 6296 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6297 | | | sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_number_of_items, tvb, ioffset, |
| 6298 | | | 4, value1, "Optional Attributes %u", value1); |
| 6299 | | | sub2tree = proto_item_add_subtree(sub2item, ett_nds); |
| 6300 | | | ioffset = ioffset + 4; |
| 6301 | | | for (r = 0; r < value1; r++) |
| 6302 | | | { |
| 6303 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6304 | | | ioffset = ioffset + 4; |
| 6305 | | | temp_values.vstring = get_string(tvb, ioffset, value2); |
| 6306 | | | proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset, |
| 6307 | | | value2, temp_values.vstring); |
| 6308 | | | ioffset = ioffset + value2; |
| 6309 | | | ioffset += align_4(tvb, ioffset); |
| 6310 | | | } |
| 6311 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6312 | | | proto_tree_add_uint_format(sub1tree, hf_nds_eid, tvb, ioffset, |
| 6313 | | | 4, value1, "Default ACL %08x", value1); |
| 6314 | | | ioffset = ioffset + 4; |
| 6315 | | | if(tvb_length_remaining(tvb, ioffset) < 4 ) |
| 6316 | | | { |
| 6317 | | | break; |
| 6318 | | | } |
| 6319 | | | } |
| 6320 | | | if(values->vflags == 5) |
| 6321 | | | { |
| 6322 | | | ns.secs = tvb_get_letohl(tvb, ioffset); |
| 6323 | | | ns.nsecs = 0; |
| 6324 | | | proto_tree_add_time_format(sub1tree, hf_es_seconds, tvb, ioffset, |
| 6325 | | | 4, &ns, "Creation Timestamp: %s", abs_time_to_str(&ns)); |
| 6326 | | | ioffset = ioffset + 4; |
| 6327 | | | replica_num = tvb_get_letohs(tvb, ioffset); |
| 6328 | | | proto_tree_add_item(sub1tree, hf_nds_replica_num, tvb, ioffset, |
| 6329 | | | 2, replica_num); |
| 6330 | | | ioffset = ioffset + 2; |
| 6331 | | | event_num = tvb_get_letohs(tvb, ioffset); |
| 6332 | | | proto_tree_add_item(sub1tree, hf_nds_event_num, tvb, ioffset, |
| 6333 | | | 2, event_num); |
| 6334 | | | ioffset = ioffset + 2; |
| 6335 | | | ns.secs = tvb_get_letohl(tvb, ioffset); |
| 6336 | | | ns.nsecs = 0; |
| 6337 | | | proto_tree_add_time_format(sub1tree, hf_es_seconds, tvb, ioffset, |
| 6338 | | | 4, &ns, "Modification Timestamp: %s", abs_time_to_str(&ns)); |
| 6339 | | | ioffset = ioffset + 4; |
| 6340 | | | replica_num = tvb_get_letohs(tvb, ioffset); |
| 6341 | | | proto_tree_add_item(sub1tree, hf_nds_replica_num, tvb, ioffset, |
| 6342 | | | 2, replica_num); |
| 6343 | | | ioffset = ioffset + 2; |
| 6344 | | | event_num = tvb_get_letohs(tvb, ioffset); |
| 6345 | | | proto_tree_add_item(sub1tree, hf_nds_event_num, tvb, ioffset, |
| 6346 | | | 2, event_num); |
| 6347 | | | ioffset = ioffset + 2; |
| 6348 | | | |
| 6349 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6350 | | | sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_number_of_items, tvb, ioffset, |
| 6351 | | | 4, value1, "Super Classes %u", value1); |
| 6352 | | | sub2tree = proto_item_add_subtree(sub2item, ett_nds); |
| 6353 | | | ioffset = ioffset + 4; |
| 6354 | | | for (r = 0; r < value1; r++) |
| 6355 | | | { |
| 6356 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6357 | | | ioffset = ioffset + 4; |
| 6358 | | | temp_values.vstring = get_string(tvb, ioffset, value2); |
| 6359 | | | proto_tree_add_string(sub2tree, hf_nds_super, tvb, ioffset, |
| 6360 | | | value2, temp_values.vstring); |
| 6361 | | | ioffset = ioffset + value2; |
| 6362 | | | ioffset += align_4(tvb, ioffset); |
| 6363 | | | } |
| 6364 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6365 | | | sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_number_of_items, tvb, ioffset, |
| 6366 | | | 4, value1, "Containment Classes %u", value1); |
| 6367 | | | sub2tree = proto_item_add_subtree(sub2item, ett_nds); |
| 6368 | | | ioffset = ioffset + 4; |
| 6369 | | | for (r = 0; r < value1; r++) |
| 6370 | | | { |
| 6371 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6372 | | | ioffset = ioffset + 4; |
| 6373 | | | temp_values.vstring = get_string(tvb, ioffset, value2); |
| 6374 | | | proto_tree_add_string(sub2tree, hf_nds_base_class, tvb, ioffset, |
| 6375 | | | value2, temp_values.vstring); |
| 6376 | | | ioffset = ioffset + value2; |
| 6377 | | | ioffset += align_4(tvb, ioffset); |
| 6378 | | | } |
| 6379 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6380 | | | sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_number_of_items, tvb, ioffset, |
| 6381 | | | 4, value1, "Naming Attributes %u", value1); |
| 6382 | | | sub2tree = proto_item_add_subtree(sub2item, ett_nds); |
| 6383 | | | ioffset = ioffset + 4; |
| 6384 | | | for (r = 0; r < value1; r++) |
| 6385 | | | { |
| 6386 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6387 | | | ioffset = ioffset + 4; |
| 6388 | | | temp_values.vstring = get_string(tvb, ioffset, value2); |
| 6389 | | | proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset, |
| 6390 | | | value2, temp_values.vstring); |
| 6391 | | | ioffset = ioffset + value2; |
| 6392 | | | ioffset += align_4(tvb, ioffset); |
| 6393 | | | } |
| 6394 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6395 | | | sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_number_of_items, tvb, ioffset, |
| 6396 | | | 4, value1, "Mandatory Attributes %u", value1); |
| 6397 | | | sub2tree = proto_item_add_subtree(sub2item, ett_nds); |
| 6398 | | | ioffset = ioffset + 4; |
| 6399 | | | for (r = 0; r < value1; r++) |
| 6400 | | | { |
| 6401 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6402 | | | ioffset = ioffset + 4; |
| 6403 | | | temp_values.vstring = get_string(tvb, ioffset, value2); |
| 6404 | | | proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset, |
| 6405 | | | value2, temp_values.vstring); |
| 6406 | | | ioffset = ioffset + value2; |
| 6407 | | | ioffset += align_4(tvb, ioffset); |
| 6408 | | | } |
| 6409 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6410 | | | sub2item = proto_tree_add_uint_format(sub1tree, hf_nds_number_of_items, tvb, ioffset, |
| 6411 | | | 4, value1, "Optional Attributes %u", value1); |
| 6412 | | | sub2tree = proto_item_add_subtree(sub2item, ett_nds); |
| 6413 | | | ioffset = ioffset + 4; |
| 6414 | | | for (r = 0; r < value1; r++) |
| 6415 | | | { |
| 6416 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6417 | | | ioffset = ioffset + 4; |
| 6418 | | | temp_values.vstring = get_string(tvb, ioffset, value2); |
| 6419 | | | proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset, |
| 6420 | | | value2, temp_values.vstring); |
| 6421 | | | ioffset = ioffset + value2; |
| 6422 | | | ioffset += align_4(tvb, ioffset); |
| 6423 | | | } |
| 6424 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6425 | | | proto_tree_add_uint_format(sub1tree, hf_nds_eid, tvb, ioffset, |
| 6426 | | | 4, value1, "Default ACL %08x", value1); |
| 6427 | | | ioffset = ioffset + 4; |
| 6428 | | | if(tvb_length_remaining(tvb, ioffset) < 4 ) |
| 6429 | | | { |
| 6430 | | | break; |
| 6431 | | | } |
| 6432 | | | } |
| 6433 | | | } |
| 6434 | | | } |
| 6435 | | | break; |
| 6436 | | | |
| 6437 | | | case MVTYPE_MODIFY_CLASS: |
| 6438 | | | for (i = 1 ; i <= values->vvalue; i++ ) |
| 6439 | | | { |
| 6440 | | | ioffset += align_4(tvb, ioffset); |
| 6441 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6442 | | | ioffset = ioffset + 4; |
| 6443 | | | values->vstring = get_string(tvb, ioffset, value1); |
| 6444 | | | proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset, |
| 6445 | | | value1, values->vstring); |
| 6446 | | | ioffset = ioffset + value1; |
| 6447 | | | } |
| 6448 | | | if(tvb_length_remaining(tvb, ioffset) < 4 ) |
| 6449 | | | { |
| 6450 | | | break; |
| 6451 | | | } |
| 6452 | | | ioffset += align_4(tvb, ioffset); |
| 6453 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6454 | | | proto_tree_add_uint_format(ntree, hf_nds_att_del, tvb, ioffset, |
| 6455 | | | 4, value1, "Attribute Names to Delete %u", value1); |
| 6456 | | | ioffset = ioffset + 4; |
| 6457 | | | for (i = 1 ; i <= value1; i++ ) |
| 6458 | | | { |
| 6459 | | | ioffset += align_4(tvb, ioffset); |
| 6460 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6461 | | | ioffset = ioffset + 4; |
| 6462 | | | values->vstring = get_string(tvb, ioffset, value2); |
| 6463 | | | proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset, |
| 6464 | | | value2, values->vstring); |
| 6465 | | | ioffset = ioffset + value2; |
| 6466 | | | } |
| 6467 | | | if(tvb_length_remaining(tvb, ioffset) < 4 ) |
| 6468 | | | { |
| 6469 | | | break; |
| 6470 | | | } |
| 6471 | | | ioffset += align_4(tvb, ioffset); |
| 6472 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6473 | | | proto_tree_add_uint_format(ntree, hf_nds_acl_add, tvb, ioffset, |
| 6474 | | | 4, value1, "ACL Templates to Add %u", value1); |
| 6475 | | | ioffset = ioffset + 4; |
| 6476 | | | for (i = 1 ; i <= value1; i++ ) |
| 6477 | | | { |
| 6478 | | | ioffset += align_4(tvb, ioffset); |
| 6479 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6480 | | | ioffset = ioffset + 4; |
| 6481 | | | values->vstring = get_string(tvb, ioffset, value2); |
| 6482 | | | proto_tree_add_string(ntree, hf_nds_attribute_dn, tvb, ioffset, |
| 6483 | | | value2, values->vstring); |
| 6484 | | | ioffset = ioffset + value2; |
| 6485 | | | ioffset += align_4(tvb, ioffset); |
| 6486 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6487 | | | ioffset = ioffset + 4; |
| 6488 | | | values->vstring = get_string(tvb, ioffset, value2); |
| 6489 | | | proto_tree_add_string(ntree, hf_nds_trustee_dn, tvb, ioffset, |
| 6490 | | | value2, values->vstring); |
| 6491 | | | ioffset = ioffset + value2; |
| 6492 | | | ioffset += align_4(tvb, ioffset); |
| 6493 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6494 | | | proto_tree_add_uint_format(ntree, hf_nds_privileges, tvb, ioffset, |
| 6495 | | | 4, value1, "Privileges 0x%08x", value1); |
| 6496 | | | ioffset = ioffset + 4; |
| 6497 | | | } |
| 6498 | | | if(tvb_length_remaining(tvb, ioffset) < 4 ) |
| 6499 | | | { |
| 6500 | | | break; |
| 6501 | | | } |
| 6502 | | | ioffset += align_4(tvb, ioffset); |
| 6503 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6504 | | | proto_tree_add_uint_format(ntree, hf_nds_acl_del, tvb, ioffset, |
| 6505 | | | 4, value1, "ACL Templates to Delete %u", value1); |
| 6506 | | | ioffset = ioffset + 4; |
| 6507 | | | for (i = 1 ; i <= value1; i++ ) |
| 6508 | | | { |
| 6509 | | | ioffset += align_4(tvb, ioffset); |
| 6510 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6511 | | | ioffset = ioffset + 4; |
| 6512 | | | values->vstring = get_string(tvb, ioffset, value2); |
| 6513 | | | proto_tree_add_string(ntree, hf_nds_attribute_dn, tvb, ioffset, |
| 6514 | | | value2, values->vstring); |
| 6515 | | | ioffset = ioffset + value2; |
| 6516 | | | ioffset += align_4(tvb, ioffset); |
| 6517 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6518 | | | ioffset = ioffset + 4; |
| 6519 | | | values->vstring = get_string(tvb, ioffset, value2); |
| 6520 | | | proto_tree_add_string(ntree, hf_nds_trustee_dn, tvb, ioffset, |
| 6521 | | | value2, values->vstring); |
| 6522 | | | ioffset = ioffset + value2; |
| 6523 | | | ioffset += align_4(tvb, ioffset); |
| 6524 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6525 | | | proto_tree_add_uint_format(ntree, hf_nds_privileges, tvb, ioffset, |
| 6526 | | | 4, value1, "Privileges 0x%08x", value1); |
| 6527 | | | ioffset = ioffset + 4; |
| 6528 | | | } |
| 6529 | | | break; |
| 6530 | | | |
| 6531 | | | case MVTYPE_PROCESS_TAGS: |
| 6532 | | | switch (values->vflags) { |
| 6533 | | | |
| 6534 | | | case 8: |
| 6535 | | | proto_tree_add_item(ntree, hf_nds_tune_mark, tvb, ioffset, 2, FALSE); |
| 6536 | | | ioffset += 2; |
| 6537 | | | value1 = tvb_get_letohs(tvb, ioffset); |
| 6538 | | | valuestr = match_strval(value1, nds_tuned_tags); |
| 6539 | | | if (valuestr == NULL) |
| 6540 | | | { |
| 6541 | | | valuestr="(Undefined Tuned Name Tag)"; |
| 6542 | | | } |
| 6543 | | | proto_tree_add_string_format(ntree, hf_value_string, tvb, ioffset, |
| 6544 | | | 2, valuestr, "Tuned Name Tag -> %s", valuestr); |
| 6545 | | | ioffset += 2; |
| 6546 | | | ioffset += align_4(tvb, ioffset); |
| 6547 | | | if (value1 == 0) { |
| 6548 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6549 | | | ioffset = ioffset + 4; |
| 6550 | | | values->vstring = get_string(tvb, ioffset, value2); |
| 6551 | | | proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset, |
| 6552 | | | value2, values->vstring); |
| 6553 | | | ioffset += value2; |
| 6554 | | | ioffset += align_4(tvb, ioffset); |
| 6555 | | | ns.secs = tvb_get_letohl(tvb, ioffset); |
| 6556 | | | ns.nsecs = 0; |
| 6557 | | | proto_tree_add_time_format(ntree, hf_es_seconds, tvb, ioffset, |
| 6558 | | | 4, &ns, "Creation Timestamp: %s", abs_time_to_str(&ns)); |
| 6559 | | | ioffset += 4; |
| 6560 | | | replica_num = tvb_get_letohs(tvb, ioffset); |
| 6561 | | | proto_tree_add_item(ntree, hf_nds_replica_num, tvb, ioffset, |
| 6562 | | | 2, replica_num); |
| 6563 | | | ioffset = ioffset + 2; |
| 6564 | | | event_num = tvb_get_letohs(tvb, ioffset); |
| 6565 | | | proto_tree_add_item(ntree, hf_nds_event_num, tvb, ioffset, |
| 6566 | | | 2, event_num); |
| 6567 | | | ioffset = ioffset + 2; |
| 6568 | | | } |
| 6569 | | | else |
| 6570 | | | { |
| 6571 | | | value1 = tvb_get_letohl(tvb, ioffset); |
| 6572 | | | sub1item = proto_tree_add_uint_format(ntree, hf_nds_acl_del, tvb, ioffset, |
| 6573 | | | 4, value1, "Number of RDN Items %u", value1); |
| 6574 | | | sub1tree = proto_item_add_subtree(sub1item, ett_nds); |
| 6575 | | | ioffset = ioffset + 4; |
| 6576 | | | for (i=1; i <= value1; i++) { |
| 6577 | | | sub2item = proto_tree_add_text(sub1tree, tvb, ioffset, 0, "Item %u", i); |
| 6578 | | | sub2tree = proto_item_add_subtree(sub2item, ett_nds); |
| 6579 | | | ioffset += align_4(tvb, ioffset); |
| 6580 | | | |
| 6581 | | | value5 = tvb_get_letohl(tvb, ioffset); |
| 6582 | | | valuestr = match_strval(value5, nds_tuned_item_tags); |
| 6583 | | | if (valuestr == NULL) |
| 6584 | | | { |
| 6585 | | | valuestr="(Undefined Tuned Name Tag)"; |
| 6586 | | | } |
| 6587 | | | if (value5 == 0) { |
| 6588 | | | proto_tree_add_string_format(sub2tree, hf_value_string, tvb, ioffset, |
| 6589 | | | 4, valuestr, "Item Tag -> %s", valuestr); |
| 6590 | | | ioffset += 4; |
| 6591 | | | ns.secs = tvb_get_letohl(tvb, ioffset); |
| 6592 | | | ns.nsecs = 0; |
| 6593 | | | proto_tree_add_time_format(sub2tree, hf_es_seconds, tvb, ioffset, |
| 6594 | | | 4, &ns, "Timestamp: %s", abs_time_to_str(&ns)); |
| 6595 | | | ioffset += 4; |
| 6596 | | | replica_num = tvb_get_letohs(tvb, ioffset); |
| 6597 | | | proto_tree_add_item(sub2tree, hf_nds_replica_num, tvb, ioffset, |
| 6598 | | | 2, replica_num); |
| 6599 | | | ioffset = ioffset + 2; |
| 6600 | | | event_num = tvb_get_letohs(tvb, ioffset); |
| 6601 | | | proto_tree_add_item(sub2tree, hf_nds_event_num, tvb, ioffset, |
| 6602 | | | 2, event_num); |
| 6603 | | | ioffset = ioffset + 2; |
| 6604 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6605 | | | ioffset = ioffset + 4; |
| 6606 | | | values->vstring = get_string(tvb, ioffset, value2); |
| 6607 | | | proto_tree_add_string(sub2tree, hf_mv_string, tvb, ioffset, |
| 6608 | | | value2, values->vstring); |
| 6609 | | | ioffset += value2; |
| 6610 | | | } |
| 6611 | | | |
| 6612 | | | |
| 6613 | | | |
| 6614 | | | |
| 6615 | | | |
| 6616 | | | else |
| 6617 | | | { |
| 6618 | | | ioffset += 4; |
| 6619 | | | } |
| 6620 | | | } |
| 6621 | | | } |
| 6622 | | | values->voffset=ioffset; |
| 6623 | | | break; |
| 6624 | | | default: |
| 6625 | | | values->vstring = get_string(tvb, ioffset, values->vlength); |
| 6626 | | | proto_tree_add_string(ntree, hf_mv_string, tvb, ioffset, |
| 6627 | | | values->vlength, values->vstring); |
| 6628 | | | values->voffset=ioffset + values->vlength; |
| 6629 | | | ioffset = values->voffset; |
| 6630 | | | ioffset += align_4(tvb, ioffset); |
| 6631 | | | break; |
| 6632 | | | } |
| 6633 | | | break; |
| 6634 | | | |
| 6635 | | | case MVTYPE_PROCESS_ITERATOR: |
| 6636 | | | temp_values.vvalue = tvb_get_letohl(tvb, ioffset); |
| 6637 | | | |
| 6638 | | | temp_values.vstring = (char *)match_strval(temp_values.vvalue, nds_info_type); |
| 6639 | | | if(temp_values.vstring == NULL) |
| 6640 | | | { |
| 6641 | | | temp_values.vstring = "No Info Type Set"; |
| 6642 | | | } |
| 6643 | | | |
| 6644 | | | proto_tree_add_string(ntree, hf_nds_info_type, tvb, ioffset, 4, temp_values.vstring); |
| 6645 | | | ioffset = ioffset + 4; |
| 6646 | | | temp_values.vvalue = tvb_get_letohs(tvb, ioffset); |
| 6647 | | | value5 = tvb_get_letohl(tvb, ioffset); |
| 6648 | | | temp_values.vdesc = "Information Flags (low) Byte:"; |
| 6649 | | | temp_values.vlength = 2; |
| 6650 | | | temp_values.hfname = hf_nds_rflags; |
| 6651 | | | temp_values.voffset = ioffset; |
| 6652 | | | temp_values.bit1 = "Output Flags"; |
| 6653 | | | temp_values.bit1hfname = hf_bit1infoflagsl; |
| 6654 | | | temp_values.bit2 = "Entry ID"; |
| 6655 | | | temp_values.bit2hfname = hf_bit2infoflagsl; |
| 6656 | | | temp_values.bit3 = "Entry Flags"; |
| 6657 | | | temp_values.bit3hfname = hf_bit3infoflagsl; |
| 6658 | | | temp_values.bit4 = "Subordinate Count"; |
| 6659 | | | temp_values.bit4hfname = hf_bit4infoflagsl; |
| 6660 | | | temp_values.bit5 = "Modification Time"; |
| 6661 | | | temp_values.bit5hfname = hf_bit5infoflagsl; |
| 6662 | | | temp_values.bit6 = "Modification Timestamp"; |
| 6663 | | | temp_values.bit6hfname = hf_bit6infoflagsl; |
| 6664 | | | temp_values.bit7 = "Creation Timestamp"; |
| 6665 | | | temp_values.bit7hfname = hf_bit7infoflagsl; |
| 6666 | | | temp_values.bit8 = "Partition Root ID"; |
| 6667 | | | temp_values.bit8hfname = hf_bit8infoflagsl; |
| 6668 | | | temp_values.bit9 = "Parent ID"; |
| 6669 | | | temp_values.bit9hfname = hf_bit9infoflagsl; |
| 6670 | | | temp_values.bit10 = "Revision Count"; |
| 6671 | | | temp_values.bit10hfname = hf_bit10infoflagsl; |
| 6672 | | | temp_values.bit11 = "Replica Type"; |
| 6673 | | | temp_values.bit11hfname = hf_bit11infoflagsl; |
| 6674 | | | temp_values.bit12 = "Base Class"; |
| 6675 | | | temp_values.bit12hfname = hf_bit12infoflagsl; |
| 6676 | | | temp_values.bit13 = "Relative Distinguished Name"; |
| 6677 | | | temp_values.bit13hfname = hf_bit13infoflagsl; |
| 6678 | | | temp_values.bit14 = "Distinguished Name"; |
| 6679 | | | temp_values.bit14hfname = hf_bit14infoflagsl; |
| 6680 | | | temp_values.bit15 = "Root Distinguished Name"; |
| 6681 | | | temp_values.bit15hfname = hf_bit15infoflagsl; |
| 6682 | | | temp_values.bit16 = "Parent Distinguished Name"; |
| 6683 | | | temp_values.bit16hfname = hf_bit16infoflagsl; |
| 6684 | | | process_bitfield(ntree, tvb, &temp_values); |
| 6685 | | | ioffset = ioffset+2; |
| 6686 | | | temp_values.vvalue = tvb_get_letohs(tvb, ioffset); |
| 6687 | | | temp_values.vtype = VTYPE_BITFIELD; |
| 6688 | | | temp_values.vdesc = "Information Flags (high) Byte:"; |
| 6689 | | | temp_values.vlength = 2; |
| 6690 | | | temp_values.hfname= hf_nds_rflags; |
| 6691 | | | temp_values.voffset = ioffset; |
| 6692 | | | temp_values.bit1 = "Purge Time"; |
| 6693 | | | temp_values.bit1hfname = hf_bit1infoflagsh; |
| 6694 | | | temp_values.bit2 = "Dereference Base Class"; |
| 6695 | | | temp_values.bit2hfname = hf_bit2infoflagsh; |
| 6696 | | | temp_values.bit3 = "Replica Number"; |
| 6697 | | | temp_values.bit3hfname = hf_bit3infoflagsh; |
| 6698 | | | temp_values.bit4 = "Replica State"; |
| 6699 | | | temp_values.bit4hfname = hf_bit4infoflagsh; |
| 6700 | | | temp_values.bit5 = "Federation Boundary"; |
| 6701 | | | temp_values.bit5hfname = hf_bit5infoflagsh; |
| 6702 | | | temp_values.bit6 = "Schema Boundary"; |
| 6703 | | | temp_values.bit6hfname = hf_bit6infoflagsh; |
| 6704 | | | temp_values.bit7 = "Federation Boundary ID"; |
| 6705 | | | temp_values.bit7hfname = hf_bit7infoflagsh; |
| 6706 | | | temp_values.bit8 = "Schema Boundary ID"; |
| 6707 | | | temp_values.bit8hfname = hf_bit8infoflagsh; |
| 6708 | | | temp_values.bit9 = "Current Subcount"; |
| 6709 | | | temp_values.bit9hfname = hf_bit9infoflagsh; |
| 6710 | | | temp_values.bit10 = "Local Entry Flags"; |
| 6711 | | | temp_values.bit10hfname = hf_bit10infoflagsh; |
| 6712 | | | temp_values.bit11 = "Not Defined"; |
| 6713 | | | temp_values.bit11hfname = hf_bit11infoflagsh; |
| 6714 | | | temp_values.bit12 = "Not Defined"; |
| 6715 | | | temp_values.bit12hfname = hf_bit12infoflagsh; |
| 6716 | | | temp_values.bit13 = "Not Defined"; |
| 6717 | | | temp_values.bit13hfname = hf_bit13infoflagsh; |
| 6718 | | | temp_values.bit14 = "Not Defined"; |
| 6719 | | | temp_values.bit14hfname = hf_bit14infoflagsh; |
| 6720 | | | temp_values.bit15 = "Not Defined"; |
| 6721 | | | temp_values.bit15hfname = hf_bit15infoflagsh; |
| 6722 | | | temp_values.bit16 = "Not Defined"; |
| 6723 | | | temp_values.bit16hfname = hf_bit16infoflagsh; |
| 6724 | | | ioffset = ioffset+2; |
| 6725 | | | process_bitfield(ntree, tvb, &temp_values); |
| 6726 | | | ioffset += 4; |
| 6727 | | | proto_tree_add_item(ntree, hf_nds_time_filter, tvb, ioffset, 4, FALSE); |
| 6728 | | | ioffset += 4; |
| 6729 | | | proto_tree_add_item(ntree, hf_nds_all_attr, tvb, ioffset, 4, FALSE); |
| 6730 | | | ioffset += 4; |
| 6731 | | | value2 = tvb_get_letohl(tvb, ioffset); |
| 6732 | | | sub1item = proto_tree_add_uint_format(ntree, hf_nds_number_of_items, tvb, ioffset, |
| 6733 | | | 4, value2, "Number of Attributes %u", value2); |
| 6734 | | | sub1tree = proto_item_add_subtree(sub1item, ett_nds); |
| 6735 | | | ioffset += 4; |
| 6736 | | | for (i=1; i<=value2; i++) { |
| 6737 | | | sub2item = proto_tree_add_text(sub1tree, tvb, ioffset, 0, "Attribute %u", i); |
| 6738 | | | sub2tree = proto_item_add_subtree(sub2item, ett_nds); |
| 6739 | | | ioffset += align_4(tvb, ioffset); |
| 6740 | | | value3 = tvb_get_letohl(tvb, ioffset); |
| 6741 | | | ioffset = ioffset + 4; |
| 6742 | | | values->vstring = get_string(tvb, ioffset, value3); |
| 6743 | | | proto_tree_add_string(sub2tree, hf_nds_attribute_dn, tvb, ioffset, |
| 6744 | | | value3, values->vstring); |
| 6745 | | | ioffset = ioffset + value3; |
| 6746 | | | |
| 6747 | | | if(tvb_length_remaining(tvb, ioffset) < 4 ) |
| 6748 | | | { |
| 6749 | | | break; |
| 6750 | | | } |
| 6751 | | | } |
| 6752 | | | ioffset += align_4(tvb, ioffset); |
| 6753 | | | value4 = tvb_get_letohl(tvb, ioffset); |
| 6754 | | | values->vstring = (char *)match_strval(value4, iterator_subverbs); |
| 6755 | | | if(values->vstring == NULL) |
| 6756 | | | { |
| 6757 | | | values->vstring = "(No Iteration Verb Found)"; |
| 6758 | | | } |
| 6759 | | | ioffset += 4; |
| 6760 | | | dissect_nds_iterator(ntree, tvb, pinfo, value4, value5, ioffset, TRUE); |
| 6761 | | | |
| 6762 | | | values->vstring = ep_strdup_printf("(%s)", values->vstring); |
| 6763 | | | break; |
| 6764 | | | |
| 6765 | | | default: |
| 6766 | | | break; |
| 6767 | | | } |
| 6768 | | | } |
| |