aboutsummaryrefslogtreecommitdiffstats
path: root/util/scan/dvb-c/se-comhem
blob: 16bd7dd851b25cce780d1a4077613580b612a612 (plain)
1
2
3
# com hem
# freq sr fec mod
C 362000000 6875000 NONE QAM64
href='#n183'>183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563
/*
 * ESG parser
 *
 * Copyright (C) 2006 Stephane Este-Gracias (sestegra@free.fr)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 */

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <sys/stat.h>

#include <libesg/bootstrap/access_descriptor.h>
#include <libesg/encapsulation/container.h>
#include <libesg/encapsulation/fragment_management_information.h>
#include <libesg/encapsulation/data_repository.h>
#include <libesg/encapsulation/string_repository.h>
#include <libesg/representation/encapsulated_textual_esg_xml_fragment.h>
#include <libesg/representation/init_message.h>
#include <libesg/representation/textual_decoder_init.h>
#include <libesg/representation/bim_decoder_init.h>
#include <libesg/transport/session_partition_declaration.h>

#define MAX_FILENAME 256

void usage(void) {
  static const char *_usage =
    "Usage: testesg [-a <ESGAccessDescriptor>]\n"
    "               [-c <ESGContainer with Textual ESG XML Fragment>]\n"
    "               [-X XXXX]\n";

  fprintf(stderr, "%s", _usage);
  exit(1);
}

void read_from_file(const char *filename, char **buffer, int *size) {
	int fd;
	struct stat fs;

	if ((fd = open(filename, O_RDONLY)) <= 0) {
		fprintf(stderr, "File not found\n");
		exit(1);
	}

	if (fstat(fd, &fs) < 0) {
		fprintf(stderr, "File not readable\n");
		exit(1);
	}
	*size = fs.st_size;

	*buffer = (char *) malloc(*size);
	if (read(fd, *buffer, *size) != *size) {
		fprintf(stderr, "File read error\n");
		exit(1);
	}

	close(fd);

	return;
}

int main(int argc, char *argv[]) {
	char access_descriptor_filename[MAX_FILENAME] = "";
	char container_filename[MAX_FILENAME] = "";
	int c;
	char *buffer = NULL;
	int size;

	// Read command line options
	while ((c = getopt(argc, argv, "a:c:")) != -1) {
		switch (c) {
			case 'a':
				strncpy(access_descriptor_filename, optarg, MAX_FILENAME);
				break;
			case 'c':
				strncpy(container_filename, optarg, MAX_FILENAME);
				break;
			default:
				usage();
		}
	}

	// ESGAccessDescriptor
	if (strncmp(access_descriptor_filename, "", MAX_FILENAME) != 0) {
		fprintf(stdout, "**************************************************\n");
		fprintf(stdout, "Reading ESG Access Descriptor = %s\n", access_descriptor_filename);
		fprintf(stdout, "**************************************************\n\n");

		read_from_file(access_descriptor_filename, &buffer, &size);

		struct esg_access_descriptor *access_descriptor = esg_access_descriptor_decode((uint8_t *) buffer, size);
		free(buffer);
		if (access_descriptor == NULL) {
			fprintf(stderr, "ESG Access Descriptor decode error\n");
			exit(1);
		}
		fprintf(stdout, "n_o_ESGEntries %d\n\n", access_descriptor->n_o_entries);

		struct esg_entry *entry;
		esg_access_descriptor_entry_list_for_each(access_descriptor, entry) {
			fprintf(stdout, "    ESGEntryVersion %d\n", entry->version);
			fprintf(stdout, "    MultipleStreamTransport %d\n", entry->multiple_stream_transport);
			fprintf(stdout, "    IPVersion6 %d\n", entry->ip_version_6);
			fprintf(stdout, "    ProviderID %d\n", entry->provider_id);
			if (entry->ip_version_6 == 0) {
				fprintf(stdout, "    SourceIPAddress %d.%d.%d.%d\n",
					entry->source_ip.ipv4[0],
					entry->source_ip.ipv4[1],
					entry->source_ip.ipv4[2],
					entry->source_ip.ipv4[3]);
				fprintf(stdout, "    DestinationIPAddress %d.%d.%d.%d\n",
					entry->destination_ip.ipv4[0],
					entry->destination_ip.ipv4[1],
					entry->destination_ip.ipv4[2],
					entry->destination_ip.ipv4[3]);
			} else if (entry->ip_version_6 == 1) {
				fprintf(stdout, "    SourceIPAddress %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x\n",
					entry->source_ip.ipv6[0],
					entry->source_ip.ipv6[1],
					entry->source_ip.ipv6[2],
					entry->source_ip.ipv6[3],
					entry->source_ip.ipv6[4],
					entry->source_ip.ipv6[5],
					entry->source_ip.ipv6[6],
					entry->source_ip.ipv6[7],
					entry->source_ip.ipv6[8],
					entry->source_ip.ipv6[9],
					entry->source_ip.ipv6[10],
					entry->source_ip.ipv6[11],
					entry->source_ip.ipv6[12],
					entry->source_ip.ipv6[13],
					entry->source_ip.ipv6[14],
					entry->source_ip.ipv6[15]);
				fprintf(stdout, "    DestinationIPAddress %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x\n",
					entry->destination_ip.ipv6[0],
					entry->destination_ip.ipv6[1],
					entry->destination_ip.ipv6[2],
					entry->destination_ip.ipv6[3],
					entry->destination_ip.ipv6[4],
					entry->destination_ip.ipv6[5],
					entry->destination_ip.ipv6[6],
					entry->destination_ip.ipv6[7],
					entry->destination_ip.ipv6[8],
					entry->destination_ip.ipv6[9],
					entry->destination_ip.ipv6[10],
					entry->destination_ip.ipv6[11],
					entry->destination_ip.ipv6[12],
					entry->destination_ip.ipv6[13],
					entry->destination_ip.ipv6[14],
					entry->destination_ip.ipv6[15]);
				}
			fprintf(stdout, "Port %d\n", entry->port);
			fprintf(stdout, "TSI %d\n", entry->tsi);
			fprintf(stdout, "\n");
		}
	}

	// ESGContainer
	if (strncmp(container_filename, "", MAX_FILENAME) != 0) {
		fprintf(stdout, "**************************************************\n");
		fprintf(stdout, "Reading ESG Container = %s\n", container_filename);
		fprintf(stdout, "**************************************************\n\n");

		read_from_file(container_filename, &buffer, &size);

		struct esg_container *container = esg_container_decode((uint8_t *) buffer, size);
		free(buffer);
		if (container == NULL) {
			fprintf(stderr, "ESG Container decode error\n");
			exit(1);
		}
		if (container->header == NULL) {
			fprintf(stderr, "ESG Container no header found\n");
			exit(1);
		}

		struct esg_encapsulation_structure *fragment_management_information = NULL;
		struct esg_data_repository *data_repository = NULL;
		struct esg_string_repository *string_repository = NULL;
		struct esg_container_structure *structure = NULL;
		struct esg_init_message *init_message = NULL;
		struct esg_textual_encoding_parameters *textual_encoding_parameters = NULL;
		struct esg_textual_decoder_init *textual_decoder_init = NULL;
		struct esg_namespace_prefix *namespace_prefix = NULL;
		struct esg_xml_fragment_type *xml_fragment_type = NULL;
		struct esg_bim_encoding_parameters *bim_encoding_parameters = NULL;
		struct esg_bim_decoder_init *bim_decoder_init = NULL;
		struct esg_session_partition_declaration *partition = NULL;
		struct esg_session_field *field = NULL;
		struct esg_session_ip_stream *ip_stream = NULL;
		struct esg_session_ip_stream_field *ip_stream_field = NULL;
		esg_container_header_structure_list_for_each(container->header, structure) {
			fprintf(stdout, "    structure_type %d [0x%02x]\n", structure->type, structure->type);
			fprintf(stdout, "    structure_id %d [0x%02x]\n", structure->id, structure->id);
			fprintf(stdout, "    structure_ptr %d\n", structure->ptr);
			fprintf(stdout, "    structure_length %d\n\n", structure->length);
				switch (structure->type) {
				case 0x01: {
					switch (structure->id) {
						case 0x00: {
							fprintf(stdout, "        ESG Fragment Management Information\n");

							fragment_management_information = (struct esg_encapsulation_structure *) structure->data;
							if (fragment_management_information == NULL) {
								fprintf(stderr, "ESG Fragment Management Information decode error\n");
								exit(1);
							}

							fprintf(stdout, "            fragment_reference_format %d [0x%02x]\n\n", fragment_management_information->header->fragment_reference_format, fragment_management_information->header->fragment_reference_format);

							struct esg_encapsulation_entry *entry;
							esg_encapsulation_structure_entry_list_for_each(fragment_management_information, entry) {
								fprintf(stdout, "                fragment_type %d [0x%02x]\n", entry->fragment_reference->fragment_type, entry->fragment_reference->fragment_type);
								fprintf(stdout, "                data_repository_offset %d\n", entry->fragment_reference->data_repository_offset);
								fprintf(stdout, "                fragment_version %d\n", entry->fragment_version);
								fprintf(stdout, "                fragment_id %d\n\n", entry->fragment_id);
							}

							break;
						}
						default: {
							fprintf(stdout, "        Unknown structure_id\n");
						}
					}
					break;
				}
				case 0x02: {
					switch (structure->id) {
						case 0x00: {
							fprintf(stdout, "        ESG String Repository / ");

							string_repository = (struct esg_string_repository *) structure->data;
							if (string_repository == NULL) {
								fprintf(stderr, "ESG String Repository decode error\n");
								exit(1);
							}

							fprintf(stdout, "encoding_type %d / length %d\n\n", string_repository->encoding_type, string_repository->length);

							break;
						}
						default: {
							fprintf(stdout, "        Unknown structure_id\n");
						}
					}
					break;
				}
				case 0x03: {
					//TODO
					break;
				}
				case 0x04: {
					//TODO
					break;
				}
				case 0x05: {
					//TODO
					break;
				}
				case 0xE0: {
					switch (structure->id) {
						case 0x00: {
							fprintf(stdout, "        ESG Data Repository / ");

							data_repository = (struct esg_data_repository *) structure->data;
							if (data_repository == NULL) {
								fprintf(stderr, "ESG Data Repository decode error\n");
								exit(1);
							}

							fprintf(stdout, "length %d\n\n", data_repository->length);

							break;
						}
						default: {
							fprintf(stdout, "        Unknown structure_id\n");
						}
					}
					break;
				}
				case 0xE1: {
					switch (structure->id) {
						case 0xFF: {
							fprintf(stdout, "        ESG Session Partition Declaration\n");

							partition = (struct esg_session_partition_declaration *) structure->data;
							fprintf(stdout, "            num_fields %d\n", partition->num_fields);
							fprintf(stdout, "            overlapping %d\n\n", partition->overlapping);
							esg_session_partition_declaration_field_list_for_each(partition, field) {
								fprintf(stdout, "                identifier %d\n", field->identifier);
								fprintf(stdout, "                encoding %d\n",field->encoding);
								fprintf(stdout, "                length %d\n\n",field->length);
							}
							fprintf(stdout, "            n_o_IPStreams %d\n", partition->n_o_ip_streams);
							fprintf(stdout, "            IPVersion6 %d\n\n", partition->ip_version_6);
							esg_session_partition_declaration_ip_stream_list_for_each(partition, ip_stream) {
								fprintf(stdout, "                IPStreamID %d\n", ip_stream->id);
								if (partition->ip_version_6 == 0) {
									fprintf(stdout, "                SourceIPAddress %d.%d.%d.%d\n",
										ip_stream->source_ip.ipv4[0],
										ip_stream->source_ip.ipv4[1],
										ip_stream->source_ip.ipv4[2],
										ip_stream->source_ip.ipv4[3]);
									fprintf(stdout, "                DestinationIPAddress %d.%d.%d.%d\n",
										ip_stream->destination_ip.ipv4[0],
										ip_stream->destination_ip.ipv4[1],
										ip_stream->destination_ip.ipv4[2],
										ip_stream->destination_ip.ipv4[3]);
								} else if (partition->ip_version_6 == 1) {
									fprintf(stdout, "                SourceIPAddress %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x\n",
										ip_stream->source_ip.ipv6[0],
										ip_stream->source_ip.ipv6[1],
										ip_stream->source_ip.ipv6[2],
										ip_stream->source_ip.ipv6[3],
										ip_stream->source_ip.ipv6[4],
										ip_stream->source_ip.ipv6[5],
										ip_stream->source_ip.ipv6[6],
										ip_stream->source_ip.ipv6[7],
										ip_stream->source_ip.ipv6[8],
										ip_stream->source_ip.ipv6[9],
										ip_stream->source_ip.ipv6[10],
										ip_stream->source_ip.ipv6[11],
										ip_stream->source_ip.ipv6[12],
										ip_stream->source_ip.ipv6[13],
										ip_stream->source_ip.ipv6[14],
										ip_stream->source_ip.ipv6[15]);
									fprintf(stdout, "                DestinationIPAddress %02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x\n",
										ip_stream->destination_ip.ipv6[0],
										ip_stream->destination_ip.ipv6[1],
										ip_stream->destination_ip.ipv6[2],
										ip_stream->destination_ip.ipv6[3],
										ip_stream->destination_ip.ipv6[4],
										ip_stream->destination_ip.ipv6[5],
										ip_stream->destination_ip.ipv6[6],
										ip_stream->destination_ip.ipv6[7],
										ip_stream->destination_ip.ipv6[8],
										ip_stream->destination_ip.ipv6[9],
										ip_stream->destination_ip.ipv6[10],
										ip_stream->destination_ip.ipv6[11],
										ip_stream->destination_ip.ipv6[12],
										ip_stream->destination_ip.ipv6[13],
										ip_stream->destination_ip.ipv6[14],
										ip_stream->destination_ip.ipv6[15]);
								}
								fprintf(stdout, "                Port %d\n", ip_stream->port);
								fprintf(stdout, "                SessionID %d\n", ip_stream->session_id);

								field = partition->field_list;
								esg_session_ip_stream_field_list_for_each(ip_stream, ip_stream_field) {
									switch (field->encoding) {
										case 0x0000: {
											if (ip_stream_field->start_field_value != NULL) {
												fprintf(stdout, "                start_field_value %s\n", ip_stream_field->start_field_value->string);
											}
											fprintf(stdout, "                end_field_value %s\n", ip_stream_field->end_field_value->string);
											break;
										}
										case 0x0101: {
											if (ip_stream_field->start_field_value != NULL) {
												fprintf(stdout, "                start_field_value %d\n", ip_stream_field->start_field_value->unsigned_short);
											}
											fprintf(stdout, "                end_field_value %d\n", ip_stream_field->end_field_value->unsigned_short);
											break;
										}
									}

									field = field->_next;
								}
								fprintf(stdout, "\n");
							}
							break;
						}
						default: {
							fprintf(stdout, "        Unknown structure_id\n");
						}
					}
					break;
				}
				case 0xE2: {
					switch (structure->id) {
						case 0x00: {
							fprintf(stdout, "        ESG Init Message\n");

							init_message = (struct esg_init_message *) structure->data;
							if (init_message == NULL) {
								fprintf(stderr, "ESG Init Message decode error\n");
								exit(1);
							}

							fprintf(stdout, "            EncodingVersion %d [0x%02x]\n", init_message->encoding_version, init_message->encoding_version);
							fprintf(stdout, "            IndexingFlag %d\n", init_message->indexing_flag);
							fprintf(stdout, "            DecoderInitptr %d\n", init_message->decoder_init_ptr);
							if (init_message->indexing_flag) {
								fprintf(stdout, "            IndexingVersion %d\n", init_message->indexing_version);
							}

							switch (init_message->encoding_version) {
								case 0xF1: {
									bim_encoding_parameters = (struct esg_bim_encoding_parameters *) init_message->encoding_parameters;
									if (bim_encoding_parameters == NULL) {
										fprintf(stderr, "ESG Init Message decode error / bim_encoding_parameters\n");
										exit(1);
									}
									fprintf(stdout, "            BufferSizeFlag %d\n", bim_encoding_parameters->buffer_size_flag);
									fprintf(stdout, "            PositionCodeFlag %d\n", bim_encoding_parameters->position_code_flag);
									fprintf(stdout, "            CharacterEncoding %d\n", bim_encoding_parameters->character_encoding);
									if (bim_encoding_parameters->buffer_size_flag) {
										fprintf(stdout, "            BufferSize %d\n", bim_encoding_parameters->buffer_size);
									}

									// TODO BimDecoderInit
									break;
								}
								case 0xF2:
								case 0xF3: {
									textual_encoding_parameters = (struct esg_textual_encoding_parameters *) init_message->encoding_parameters;
									if (textual_encoding_parameters == NULL) {
										fprintf(stderr, "ESG Init Message decode error / textual_encoding_parameters\n");
										exit(1);
									}
									fprintf(stdout, "            CharacterEncoding %d\n\n", textual_encoding_parameters->character_encoding);

									// TextualDecoderInit
									textual_decoder_init = (struct esg_textual_decoder_init *) init_message->decoder_init;
									if (textual_decoder_init == NULL) {
										fprintf(stderr, "ESG Init Message decode error / textual_decoder_init\n");
										exit(1);
									}
									fprintf(stdout, "            Textual DecoderInit\n");
									fprintf(stdout, "                num_namespaces_prefixes %d\n\n", textual_decoder_init->num_namespace_prefixes);
									esg_textual_decoder_namespace_prefix_list_for_each(textual_decoder_init, namespace_prefix) {
										fprintf(stdout, "                    prefix_string_ptr %d\n", namespace_prefix->prefix_string_ptr);
										fprintf(stdout, "                    namespace_URI_ptr %d\n\n", namespace_prefix->namespace_uri_ptr);
									}
									fprintf(stdout, "                num_fragment_types %d\n\n", textual_decoder_init->num_fragment_types);
									esg_textual_decoder_xml_fragment_type_list_for_each(textual_decoder_init, xml_fragment_type) {
										fprintf(stdout, "                    xpath_ptr %d\n", xml_fragment_type->xpath_ptr);
										fprintf(stdout, "                    ESG_XML_fragment_type %d\n\n", xml_fragment_type->xml_fragment_type);
									}
									break;
								}
								default: {
									fprintf(stdout, "            Unknown EncodingVersion\n");
								}
							}

							break;
						}
						default: {
							fprintf(stdout, "        Unknown structure_id\n");
						}
					}
					break;
				}
				default: {
					fprintf(stdout, "        Unknown structure_type\n");
				}
			}
		}
		fprintf(stdout, "\n");

		fprintf(stdout, "structure_body_ptr %d\n", container->structure_body_ptr);
		fprintf(stdout, "structure_body_length %d\n\n", container->structure_body_length);

		// ESG XML Fragment
		if (fragment_management_information) {
			fprintf(stdout, "**************************************************\n");
			fprintf(stdout, "ESG XML Fragment\n");
			fprintf(stdout, "**************************************************\n\n");

			struct esg_encapsulation_entry *entry;
			esg_encapsulation_structure_entry_list_for_each(fragment_management_information, entry) {
				switch (entry->fragment_reference->fragment_type) {
					case 0x00: {
						if (data_repository) {
							struct esg_encapsulated_textual_esg_xml_fragment *esg_xml_fragment = esg_encapsulated_textual_esg_xml_fragment_decode(data_repository->data + entry->fragment_reference->data_repository_offset, data_repository->length);

							fprintf(stdout, "ESG_XML_fragment_type %d\n", esg_xml_fragment->esg_xml_fragment_type);
							fprintf(stdout, "data_length %d\n", esg_xml_fragment->data_length);
							fprintf(stdout, "fragment_version %d\n", entry->fragment_version);
							fprintf(stdout, "fragment_id %d\n\n", entry->fragment_id);
							char *string = (char *) malloc(esg_xml_fragment->data_length + 1);
							memcpy(string, esg_xml_fragment->data, esg_xml_fragment->data_length);
							string[esg_xml_fragment->data_length] = 0;
							fprintf(stdout, "%s\n", string);

						} else {
							fprintf(stderr, "ESG Data Repository not found");
						}
						break;
					}
					case 0x01: {
						// TODO
						break;
					}
					case 0x02: {
						// TODO
						break;
					}
					default: {
					}
				}
			}
		}

		// String
		if (init_message) {
			fprintf(stdout, "**************************************************\n");
			fprintf(stdout, "String\n");
			fprintf(stdout, "**************************************************\n\n");

			switch (init_message->encoding_version) {
				case 0xF1: {
					// TODO Bim
					break;
				}
				case 0xF2: {
					// TODO GZIP
					break;
				}
				case 0xF3: {
					// RAW
					if (string_repository) {
						textual_decoder_init = (struct esg_textual_decoder_init *) init_message->decoder_init;
						esg_textual_decoder_namespace_prefix_list_for_each(textual_decoder_init, namespace_prefix) {
							fprintf(stdout, "prefix_string_ptr %d\n", namespace_prefix->prefix_string_ptr);
							fprintf(stdout, "%s\n", string_repository->data + namespace_prefix->prefix_string_ptr);
							fprintf(stdout, "namespace_URI_ptr %d\n", namespace_prefix->namespace_uri_ptr);
							fprintf(stdout, "%s\n\n", string_repository->data + namespace_prefix->namespace_uri_ptr - 1); // TODO -1
						}

						esg_textual_decoder_xml_fragment_type_list_for_each(textual_decoder_init, xml_fragment_type) {
							fprintf(stdout, "xpath_ptr %d\n", xml_fragment_type->xpath_ptr);
							fprintf(stdout, "ESG_XML_fragment_type %d\n", xml_fragment_type->xml_fragment_type);
							fprintf(stdout, "%s\n\n", string_repository->data + xml_fragment_type->xpath_ptr - 1); // TODO -1
						}
					}
					break;
				}
				default: {
					fprintf(stdout, "            Unknown EncodingVersion\n");
				}
			}
		}
	}

	return 0;
}