summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-10-20 13:40:17 -0700
committerDamjan Marion <dmarion@me.com>2020-10-21 11:04:47 +0000
commit5004b0d2f27476eb751cdfe4000236b28cba2064 (patch)
treeba7aac8d94aa18bef5e7ae0572917a5566a1b1d8
parent97f9694ad364a9bb19d9f642ececfd271d1214ec (diff)
stn: remove dependency on tcp and udp headers
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I8a842759009ec0f433f0aeff47f4e1c889d7b211
-rw-r--r--src/plugins/stn/stn.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/plugins/stn/stn.c b/src/plugins/stn/stn.c
index cab2cf10e01..760061fe23f 100644
--- a/src/plugins/stn/stn.c
+++ b/src/plugins/stn/stn.c
@@ -18,9 +18,8 @@
#include <vnet/plugin/plugin.h>
#include <vpp/app/version.h>
#include <vnet/ip/format.h>
+#include <vnet/ip/punt.h>
#include <vnet/ethernet/packet.h>
-#include <vnet/udp/udp.h>
-#include <vnet/tcp/tcp.h>
stn_main_t stn_main;
static vlib_node_registration_t stn_ip4_punt;
@@ -313,10 +312,23 @@ int stn_rule_add_del (stn_rule_add_del_args_t *args)
vnet_feature_enable_disable("ip4-punt", "stn-ip4-punt",
0, 1, 0, 0);
- udp_punt_unknown(vm, 0, 1);
- udp_punt_unknown(vm, 1, 1);
- tcp_punt_unknown(vm, 0, 1);
- tcp_punt_unknown(vm, 1, 1);
+ punt_reg_t pr = {
+ .punt = {
+ .l4 = {
+ .af = AF_IP4,
+ .port = ~0,
+ .protocol = IP_PROTOCOL_UDP,
+ },
+ },
+ .type = PUNT_TYPE_L4,
+ };
+ vnet_punt_add_del (vm, &pr, 1 /* is_add */);
+ pr.punt.l4.af = AF_IP6;
+ vnet_punt_add_del (vm, &pr, 1 /* is_add */);
+ pr.punt.l4.protocol = IP_PROTOCOL_TCP;
+ vnet_punt_add_del (vm, &pr, 1 /* is_add */);
+ pr.punt.l4.af = AF_IP4;
+ vnet_punt_add_del (vm, &pr, 1 /* is_add */);
}
}
n226'>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 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143
/*
 * Copyright (c) 2017-2019 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <vlib/vlib.h>
#include <vnet/vnet.h>
#include <vnet/pg/pg.h>
#include <vnet/ip/ip.h>
#include <vnet/ethernet/ethernet.h>

#include "hicn.h"
#include "pg.h"
#include "parser.h"
#include "infra.h"

/* Registration struct for a graph node */
vlib_node_registration_t hicn_pg_interest_node;
vlib_node_registration_t hicn_pg_data_node;

/* Stats, which end up called "error" even though they aren't... */
#define foreach_hicnpg_error                                  \
  _(PROCESSED, "hICN PG packets processed")                   \
  _(DROPPED, "hICN PG packets dropped")                       \
  _(INTEREST_MSGS_GENERATED, "hICN PG Interests generated")   \
  _(CONTENT_MSGS_RECEIVED, "hICN PG Content msgs received")

typedef enum
{
#define _(sym,str) HICNPG_ERROR_##sym,
  foreach_hicnpg_error
#undef _
    HICNPG_N_ERROR,
} hicnpg_error_t;

static char *hicnpg_error_strings[] = {
#define _(sym,string) string,
  foreach_hicnpg_error
#undef _
};

/*
 * Next graph nodes, which reference the list in the actual registration
 * block below
 */
typedef enum
{
  HICNPG_INTEREST_NEXT_V4_LOOKUP,
  HICNPG_INTEREST_NEXT_V6_LOOKUP,
  HICNPG_INTEREST_NEXT_IFACE_IP4_INPUT,
  HICNPG_INTEREST_NEXT_IFACE_IP6_INPUT,
  HICNPG_INTEREST_NEXT_DROP,
  HICNPG_N_NEXT,
} hicnpg_interest_next_t;

/* Trace context struct */
typedef struct
{
  u32 next_index;
  u32 sw_if_index;
  u8 pkt_type;
  u16 msg_type;
} hicnpg_trace_t;

hicnpg_main_t hicnpg_main = {
  .index = (u32) 0,
  .index_ifaces = (u32) 1,
  .max_seq_number = (u32) ~ 0,
  .interest_lifetime = 4,
  .n_flows = (u32) 0,
  .n_ifaces = (u32) 1,
  .hicn_underneath = 0
};

hicnpg_server_main_t hicnpg_server_main = {
  .node_index = 0,
  .hicn_underneath = 0
};

/* packet trace format function */
static u8 *
format_hicnpg_trace (u8 * s, va_list * args)
{
  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
  hicnpg_trace_t *t = va_arg (*args, hicnpg_trace_t *);

  s = format (s, "HICNPG: pkt: %d, msg %d, sw_if_index %d, next index %d",
	      (int) t->pkt_type, (int) t->msg_type,
	      t->sw_if_index, t->next_index);
  return (s);
}

always_inline void
hicn_rewrite_interestv4 (vlib_main_t * vm, vlib_buffer_t * b0, u32 seq_number,
			 u16 lifetime, u32 next_flow, u32 iface);

always_inline void
hicn_rewrite_interestv6 (vlib_main_t * vm, vlib_buffer_t * b0, u32 seq_number,
			 u16 lifetime, u32 next_flow, u32 iface);

always_inline void
convert_interest_to_data_v4 (vlib_main_t * vm, vlib_buffer_t * b0,
			     vlib_buffer_t * rb, u32 bi0);

always_inline void
convert_interest_to_data_v6 (vlib_main_t * vm, vlib_buffer_t * b0,
			     vlib_buffer_t * rb, u32 bi0);

always_inline void
calculate_tcp_checksum_v4 (vlib_main_t * vm, vlib_buffer_t * b0);

always_inline void
calculate_tcp_checksum_v6 (vlib_main_t * vm, vlib_buffer_t * b0);
/*
 * Node function for the icn packet-generator client. The goal here is to
 * manipulate/tweak a stream of packets that have been injected by the vpp
 * packet generator to generate icn request traffic.
 */
static uword
hicnpg_client_interest_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
				vlib_frame_t * frame)
{
  u32 n_left_from, *from, *to_next;
  hicnpg_interest_next_t next_index;
  u32 pkts_processed = 0, pkts_dropped = 0;
  u32 interest_msgs_generated = 0;
  u32 bi0, bi1;
  vlib_buffer_t *b0, *b1;
  u8 pkt_type0 = 0, pkt_type1 = 0;
  u16 msg_type0 = 0, msg_type1 = 0;
  hicn_header_t *hicn0 = NULL, *hicn1 = NULL;
  hicn_name_t name0, name1;
  u16 namelen0, namelen1;
  hicnpg_main_t *hpgm = &hicnpg_main;
  int iface = 0;

  from = vlib_frame_vector_args (frame);
  n_left_from = frame->n_vectors;
  next_index = node->cached_next_index;

  while (n_left_from > 0)
    {
      u32 n_left_to_next;

      vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);

      while (n_left_from >= 4 && n_left_to_next >= 2)
	{
	  u32 next0 = HICNPG_INTEREST_NEXT_DROP;
	  u32 next1 = HICNPG_INTEREST_NEXT_DROP;
	  u32 sw_if_index0 = ~0, sw_if_index1 = ~0;
	  u8 isv6_0;
	  u8 isv6_1;

	  /* Prefetch next iteration. */
	  {
	    vlib_buffer_t *p2, *p3;

	    p2 = vlib_get_buffer (vm, from[2]);
	    p3 = vlib_get_buffer (vm, from[3]);

	    vlib_prefetch_buffer_header (p2, LOAD);
	    vlib_prefetch_buffer_header (p3, LOAD);

	    CLIB_PREFETCH (p2->data, (2 * CLIB_CACHE_LINE_BYTES), STORE);
	    CLIB_PREFETCH (p3->data, (2 * CLIB_CACHE_LINE_BYTES), STORE);
	  }

	  /*
	   * speculatively enqueue b0 and b1 to the current
	   * next frame
	   */
	  to_next[0] = bi0 = from[0];
	  to_next[1] = bi1 = from[1];
	  from += 2;
	  to_next += 2;
	  n_left_from -= 2;
	  n_left_to_next -= 2;

	  b0 = vlib_get_buffer (vm, bi0);
	  b1 = vlib_get_buffer (vm, bi1);

	  sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX];
	  sw_if_index1 = vnet_buffer (b1)->sw_if_index[VLIB_RX];

	  /* Check icn packets, locate names */
	  if (hicn_interest_parse_pkt (b0, &name0, &namelen0, &hicn0, &isv6_0)
	      == HICN_ERROR_NONE)
	    {
	      /* this node grabs only interests */

	      /* Increment the appropriate message counter */
	      interest_msgs_generated++;

	      iface = (hpgm->index_ifaces % hpgm->n_ifaces);
	      /* Rewrite and send */
	      isv6_0 ? hicn_rewrite_interestv6 (vm, b0,
						(hpgm->index /
						 hpgm->n_flows) %
						hpgm->max_seq_number,
						hpgm->interest_lifetime,
						hpgm->index % hpgm->n_flows,
						iface) :
		hicn_rewrite_interestv4 (vm, b0,
					 (hpgm->index / hpgm->n_flows) %
					 hpgm->max_seq_number,
					 hpgm->interest_lifetime,
					 hpgm->index % hpgm->n_flows, iface);

	      hpgm->index_ifaces++;
	      if (iface == (hpgm->n_ifaces - 1))
		hpgm->index++;

	      next0 =
		isv6_0 ? HICNPG_INTEREST_NEXT_V6_LOOKUP :
		HICNPG_INTEREST_NEXT_V4_LOOKUP;
	      next0 += 2 * hpgm->hicn_underneath;
	    }
	  if (hicn_interest_parse_pkt (b1, &name1, &namelen1, &hicn1, &isv6_1)
	      == HICN_ERROR_NONE)
	    {
	      /* this node grabs only interests */

	      /* Increment the appropriate message counter */
	      interest_msgs_generated++;

	      iface = (hpgm->index_ifaces % hpgm->n_ifaces);
	      /* Rewrite and send */
	      isv6_1 ? hicn_rewrite_interestv6 (vm, b1,
						(hpgm->index /
						 hpgm->n_flows) %
						hpgm->max_seq_number,
						hpgm->interest_lifetime,
						hpgm->index % hpgm->n_flows,
						iface) :
		hicn_rewrite_interestv4 (vm, b1,
					 (hpgm->index / hpgm->n_flows) %
					 hpgm->max_seq_number,
					 hpgm->interest_lifetime,
					 hpgm->index % hpgm->n_flows, iface);

	      hpgm->index_ifaces++;
	      if (iface == (hpgm->n_ifaces - 1))
		hpgm->index++;

	      next1 =
		isv6_1 ? HICNPG_INTEREST_NEXT_V6_LOOKUP :
		HICNPG_INTEREST_NEXT_V4_LOOKUP;
	      next1 += 2 * hpgm->hicn_underneath;
	    }
	  /* Send pkt to next node */
	  vnet_buffer (b0)->sw_if_index[VLIB_TX] = ~0;
	  vnet_buffer (b1)->sw_if_index[VLIB_TX] = ~0;

	  pkts_processed += 2;

	  if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)))
	    {
	      if (b0->flags & VLIB_BUFFER_IS_TRACED)
		{
		  hicnpg_trace_t *t =
		    vlib_add_trace (vm, node, b0, sizeof (*t));
		  t->pkt_type = pkt_type0;
		  t->msg_type = msg_type0;
		  t->sw_if_index = sw_if_index0;
		  t->next_index = next0;
		}
	      if (b1->flags & VLIB_BUFFER_IS_TRACED)
		{
		  hicnpg_trace_t *t =
		    vlib_add_trace (vm, node, b1, sizeof (*t));
		  t->pkt_type = pkt_type1;
		  t->msg_type = msg_type1;
		  t->sw_if_index = sw_if_index1;
		  t->next_index = next1;
		}
	    }
	  if (next0 == HICNPG_INTEREST_NEXT_DROP)
	    {
	      pkts_dropped++;
	    }
	  if (next1 == HICNPG_INTEREST_NEXT_DROP)
	    {
	      pkts_dropped++;
	    }
	  /*
	   * verify speculative enqueues, maybe switch current
	   * next frame
	   */
	  vlib_validate_buffer_enqueue_x2 (vm, node, next_index,
					   to_next, n_left_to_next,
					   bi0, bi1, next0, next1);
	}

      while (n_left_from > 0 && n_left_to_next > 0)
	{
	  u32 next0 = HICNPG_INTEREST_NEXT_DROP;
	  u32 sw_if_index0;
	  u8 isv6_0;

	  /* speculatively enqueue b0 to the current next frame */
	  bi0 = from[0];
	  to_next[0] = bi0;
	  from += 1;
	  to_next += 1;
	  n_left_from -= 1;
	  n_left_to_next -= 1;

	  b0 = vlib_get_buffer (vm, bi0);

	  sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX];

	  /* Check icn packets, locate names */
	  if (hicn_interest_parse_pkt (b0, &name0, &namelen0, &hicn0, &isv6_0)
	      == HICN_ERROR_NONE)
	    {
	      /* this node grabs only interests */

	      /* Increment the appropriate message counter */
	      interest_msgs_generated++;

	      iface = (hpgm->index_ifaces % hpgm->n_ifaces);

	      /* Rewrite and send */
	      isv6_0 ? hicn_rewrite_interestv6 (vm, b0,
						(hpgm->index /
						 hpgm->n_flows) %
						hpgm->max_seq_number,
						hpgm->interest_lifetime,
						hpgm->index % hpgm->n_flows,
						iface) :
		hicn_rewrite_interestv4 (vm, b0,
					 (hpgm->index / hpgm->n_flows) %
					 hpgm->max_seq_number,
					 hpgm->interest_lifetime,
					 hpgm->index % hpgm->n_flows, iface);

	      hpgm->index_ifaces++;
	      if (iface == (hpgm->n_ifaces - 1))
		hpgm->index++;

	      next0 =
		isv6_0 ? HICNPG_INTEREST_NEXT_V6_LOOKUP :
		HICNPG_INTEREST_NEXT_V4_LOOKUP;
	      next0 += 2 * hpgm->hicn_underneath;
	    }
	  /* Send pkt to ip lookup */
	  vnet_buffer (b0)->sw_if_index[VLIB_TX] = ~0;

	  if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)
			     && (b0->flags & VLIB_BUFFER_IS_TRACED)))
	    {
	      hicnpg_trace_t *t = vlib_add_trace (vm, node, b0, sizeof (*t));
	      t->pkt_type = pkt_type0;
	      t->msg_type = msg_type0;
	      t->sw_if_index = sw_if_index0;
	      t->next_index = next0;
	    }
	  pkts_processed += 1;

	  if (next0 == HICNPG_INTEREST_NEXT_DROP)
	    {
	      pkts_dropped++;
	    }
	  /*
	   * verify speculative enqueue, maybe switch current
	   * next frame
	   */
	  vlib_validate_buffer_enqueue_x1 (vm, node, next_index,
					   to_next, n_left_to_next,
					   bi0, next0);
	}

      vlib_put_next_frame (vm, node, next_index, n_left_to_next);
    }

  vlib_node_increment_counter (vm, hicn_pg_interest_node.index,
			       HICNPG_ERROR_PROCESSED, pkts_processed);
  vlib_node_increment_counter (vm, hicn_pg_interest_node.index,
			       HICNPG_ERROR_DROPPED, pkts_dropped);
  vlib_node_increment_counter (vm, hicn_pg_interest_node.index,
			       HICNPG_ERROR_INTEREST_MSGS_GENERATED,
			       interest_msgs_generated);

  return (frame->n_vectors);
}

void
hicn_rewrite_interestv4 (vlib_main_t * vm, vlib_buffer_t * b0, u32 seq_number,
			 u16 interest_lifetime, u32 next_flow, u32 iface)
{
  hicn_header_t *h0 = vlib_buffer_get_current (b0);

  /* Generate the right src and dst corresponding to flow and iface */
  ip46_address_t src_addr = {
    .ip4 = hicnpg_main.pgen_clt_src_addr.ip4,
  };
  hicn_name_t dst_name = {
    .ip4.prefix_as_ip4 = hicnpg_main.pgen_clt_hicn_name.ip4,
    .ip4.suffix = seq_number,
  };

  src_addr.ip4.as_u32 += clib_host_to_net_u32 (iface);
  dst_name.ip4.prefix_as_ip4.as_u32 += clib_net_to_host_u32 (next_flow);

  /* Update locator and name */
  hicn_type_t type = hicn_get_buffer (b0)->type;
  HICN_OPS4->set_interest_locator (type, &h0->protocol, &src_addr);
  HICN_OPS4->set_interest_name (type, &h0->protocol, &dst_name);

  /* Update lifetime  (currently L4 checksum is not updated) */
  HICN_OPS4->set_lifetime (type, &h0->protocol, interest_lifetime);

  /* Update checksums */
  HICN_OPS4->update_checksums (type, &h0->protocol, 0, 0);
}

/**
 * @brief Rewrite the IPv6 header as the next generated packet
 *
 * Set up a name prefix
 *  - etiher generate interest in which the name varies only after the prefix
 *  (inc : seq_number), then the flow acts on the prefix (CHECK)
 *  seq_number => TCP, FLOW =>
 *
 *  SRC : pgen_clt_src_addr.ip6 DST = generate name (pgen_clt_hicn_name.ip6)
 *  ffff:ffff:ffff:ffff         ffff:ffff:ffff:ffff
 *                 \__/                        \__/
 *                 +iface                      + flow
 *  Source is used to emulate different consumers.
 *    FIXME iface is ill-named, better name it consumer id
 *  Destination is used to iterate on the content.
 */
void
hicn_rewrite_interestv6 (vlib_main_t * vm, vlib_buffer_t * b0, u32 seq_number,
			 u16 interest_lifetime, u32 next_flow, u32 iface)
{
  hicn_header_t *h0 = vlib_buffer_get_current (b0);

  /* Generate the right src and dst corresponding to flow and iface */
  ip46_address_t src_addr = {
    .ip6 = hicnpg_main.pgen_clt_src_addr.ip6,
  };
  hicn_name_t dst_name = {
    .ip6.prefix_as_ip6 = hicnpg_main.pgen_clt_hicn_name.ip6,
    .ip6.suffix = seq_number,
  };
  src_addr.ip6.as_u32[3] += clib_host_to_net_u32 (iface);
  dst_name.ip6.prefix_as_ip6.as_u32[3] += clib_net_to_host_u32 (next_flow);

  /* Update locator and name */
  hicn_type_t type = hicn_get_buffer (b0)->type;
  HICN_OPS6->set_interest_locator (type, &h0->protocol, &src_addr);
  HICN_OPS6->set_interest_name (type, &h0->protocol, &dst_name);

  /* Update lifetime */
  HICN_OPS6->set_lifetime (type, &h0->protocol, interest_lifetime);

  /* Update checksums */
  calculate_tcp_checksum_v6 (vm, b0);
}



void
calculate_tcp_checksum_v4 (vlib_main_t * vm, vlib_buffer_t * b0)
{
  ip4_header_t *ip0;
  tcp_header_t *tcp0;
  ip_csum_t sum0;
  u32 tcp_len0;

  ip0 = (ip4_header_t *) (vlib_buffer_get_current (b0));
  tcp0 =
    (tcp_header_t *) (vlib_buffer_get_current (b0) + sizeof (ip4_header_t));
  tcp_len0 = clib_net_to_host_u16 (ip0->length) - sizeof (ip4_header_t);

  /* Initialize checksum with header. */
  if (BITS (sum0) == 32)
    {
      sum0 = clib_mem_unaligned (&ip0->src_address, u32);
      sum0 =
	ip_csum_with_carry (sum0,
			    clib_mem_unaligned (&ip0->dst_address, u32));
    }
  else
    sum0 = clib_mem_unaligned (&ip0->src_address, u64);

  sum0 = ip_csum_with_carry
    (sum0, clib_host_to_net_u32 (tcp_len0 + (ip0->protocol << 16)));

  /* Invalidate possibly old checksum. */
  tcp0->checksum = 0;

  u32 tcp_offset = sizeof (ip4_header_t);
  sum0 = ip_incremental_checksum_buffer (vm, b0, tcp_offset, tcp_len0, sum0);

  tcp0->checksum = ~ip_csum_fold (sum0);
}

void
calculate_tcp_checksum_v6 (vlib_main_t * vm, vlib_buffer_t * b0)
{
  ip6_header_t *ip0;
  tcp_header_t *tcp0;
  ip_csum_t sum0;
  u32 tcp_len0;

  ip0 = (ip6_header_t *) (vlib_buffer_get_current (b0));
  tcp0 =
    (tcp_header_t *) (vlib_buffer_get_current (b0) + sizeof (ip6_header_t));
  tcp_len0 = clib_net_to_host_u16 (ip0->payload_length);

  /* Initialize checksum with header. */
  if (BITS (sum0) == 32)
    {
      sum0 = clib_mem_unaligned (&ip0->src_address, u32);
      sum0 =
	ip_csum_with_carry (sum0,
			    clib_mem_unaligned (&ip0->dst_address, u32));
    }
  else
    sum0 = clib_mem_unaligned (&ip0->src_address, u64);

  sum0 = ip_csum_with_carry
    (sum0, clib_host_to_net_u32 (tcp_len0 + (ip0->protocol << 16)));

  /* Invalidate possibly old checksum. */
  tcp0->checksum = 0;

  u32 tcp_offset = sizeof (ip6_header_t);
  sum0 = ip_incremental_checksum_buffer (vm, b0, tcp_offset, tcp_len0, sum0);

  tcp0->checksum = ~ip_csum_fold (sum0);
}

/* *INDENT-OFF* */
VLIB_REGISTER_NODE(hicn_pg_interest_node) ={
  .function = hicnpg_client_interest_node_fn,
  .name = "hicnpg-interest",
  .vector_size = sizeof(u32),
  .format_trace = format_hicnpg_trace,
  .type = VLIB_NODE_TYPE_INTERNAL,
  .n_errors = ARRAY_LEN(hicnpg_error_strings),
  .error_strings = hicnpg_error_strings,
  .n_next_nodes = HICNPG_N_NEXT,
  .next_nodes =
  {
    [HICNPG_INTEREST_NEXT_V4_LOOKUP] = "ip4-lookup",
    [HICNPG_INTEREST_NEXT_V6_LOOKUP] = "ip6-lookup",
    [HICNPG_INTEREST_NEXT_IFACE_IP4_INPUT] = "hicn-iface-ip4-input",
    [HICNPG_INTEREST_NEXT_IFACE_IP6_INPUT] = "hicn-iface-ip6-input",
    [HICNPG_INTEREST_NEXT_DROP] = "error-drop"
  },
};
/* *INDENT-ON* */

/*
 * Next graph nodes, which reference the list in the actual registration
 * block below
 */
typedef enum
{
  HICNPG_DATA_NEXT_DROP,
  HICNPG_DATA_N_NEXT,
} hicnpg_data_next_t;

/* Trace context struct */
typedef struct
{
  u32 next_index;
  u32 sw_if_index;
  u8 pkt_type;
  u16 msg_type;
} icnpg_data_trace_t;

/* packet trace format function */
static u8 *
format_hicnpg_data_trace (u8 * s, va_list * args)
{
  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
  hicnpg_trace_t *t = va_arg (*args, hicnpg_trace_t *);

  s = format (s, "HICNPG: pkt: %d, msg %d, sw_if_index %d, next index %d",
	      (int) t->pkt_type, (int) t->msg_type,
	      t->sw_if_index, t->next_index);
  return (s);
}


/*
 * Node function for the icn packet-generator client. The goal here is to
 * manipulate/tweak a stream of packets that have been injected by the vpp
 * packet generator to generate icn request traffic.
 */
static uword
hicnpg_client_data_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
			    vlib_frame_t * frame)
{
  u32 n_left_from, *from, *to_next;
  hicnpg_data_next_t next_index;
  u32 pkts_processed = 0;
  u32 content_msgs_received = 0;
  u32 bi0, bi1;
  vlib_buffer_t *b0, *b1;
  u8 pkt_type0 = 0, pkt_type1 = 0;
  u16 msg_type0 = 1, msg_type1 = 1;

  from = vlib_frame_vector_args (frame);
  n_left_from = frame->n_vectors;
  next_index = node->cached_next_index;

  while (n_left_from > 0)
    {
      u32 n_left_to_next;
      vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);

      while (n_left_from >= 4 && n_left_to_next >= 2)
	{
	  u32 next0 = HICNPG_DATA_NEXT_DROP;
	  u32 next1 = HICNPG_DATA_NEXT_DROP;
	  u32 sw_if_index0, sw_if_index1;

	  /* Prefetch next iteration. */
	  {
	    vlib_buffer_t *p2, *p3;

	    p2 = vlib_get_buffer (vm, from[2]);
	    p3 = vlib_get_buffer (vm, from[3]);

	    vlib_prefetch_buffer_header (p2, LOAD);
	    vlib_prefetch_buffer_header (p3, LOAD);

	    CLIB_PREFETCH (p2->data, (2 * CLIB_CACHE_LINE_BYTES), STORE);
	    CLIB_PREFETCH (p3->data, (2 * CLIB_CACHE_LINE_BYTES), STORE);
	  }

	  /*
	   * speculatively enqueue b0 and b1 to the current
	   * next frame
	   */
	  to_next[0] = bi0 = from[0];
	  to_next[1] = bi1 = from[1];
	  from += 2;
	  to_next += 2;
	  n_left_from -= 2;
	  n_left_to_next -= 2;

	  b0 = vlib_get_buffer (vm, bi0);
	  b1 = vlib_get_buffer (vm, bi1);

	  sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX];
	  sw_if_index1 = vnet_buffer (b1)->sw_if_index[VLIB_RX];

	  /* Increment a counter */
	  content_msgs_received += 2;

	  if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)))
	    {
	      if (b0->flags & VLIB_BUFFER_IS_TRACED)
		{
		  icnpg_data_trace_t *t =
		    vlib_add_trace (vm, node, b0, sizeof (*t));
		  t->pkt_type = pkt_type0;
		  t->msg_type = msg_type0;
		  t->sw_if_index = sw_if_index0;
		  t->next_index = next0;
		}
	      if (b1->flags & VLIB_BUFFER_IS_TRACED)
		{
		  icnpg_data_trace_t *t =
		    vlib_add_trace (vm, node, b1, sizeof (*t));
		  t->pkt_type = pkt_type1;
		  t->msg_type = msg_type1;
		  t->sw_if_index = sw_if_index1;
		  t->next_index = next1;
		}
	    }
	  pkts_processed += 2;
	}

      while (n_left_from > 0 && n_left_to_next > 0)
	{
	  u32 next0 = HICNPG_DATA_NEXT_DROP;
	  u32 sw_if_index0;

	  /* speculatively enqueue b0 to the current next frame */
	  bi0 = from[0];
	  to_next[0] = bi0;
	  from += 1;
	  to_next += 1;
	  n_left_from -= 1;
	  n_left_to_next -= 1;

	  b0 = vlib_get_buffer (vm, bi0);

	  sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX];

	  /* Increment a counter */
	  content_msgs_received++;

	  if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)
			     && (b0->flags & VLIB_BUFFER_IS_TRACED)))
	    {
	      icnpg_data_trace_t *t =
		vlib_add_trace (vm, node, b0, sizeof (*t));
	      t->pkt_type = pkt_type0;
	      t->msg_type = msg_type0;
	      t->sw_if_index = sw_if_index0;
	      t->next_index = next0;
	    }
	  pkts_processed++;
	}
      vlib_put_next_frame (vm, node, next_index, n_left_to_next);
    }

  vlib_node_increment_counter (vm, hicn_pg_data_node.index,
			       HICNPG_ERROR_PROCESSED, pkts_processed);
  vlib_node_increment_counter (vm, hicn_pg_data_node.index,
			       HICNPG_ERROR_CONTENT_MSGS_RECEIVED,
			       content_msgs_received);
  return (frame->n_vectors);
}

/* *INDENT-OFF* */
VLIB_REGISTER_NODE(hicn_pg_data_node) =
{
  .function = hicnpg_client_data_node_fn,
  .name = "hicnpg-data",
  .vector_size = sizeof(u32),
  .format_trace = format_hicnpg_data_trace,
  .type = VLIB_NODE_TYPE_INTERNAL,
  .n_errors = ARRAY_LEN(hicnpg_error_strings),
  .error_strings = hicnpg_error_strings,
  .n_next_nodes = HICNPG_DATA_N_NEXT,
  .next_nodes =
  {
    [HICNPG_DATA_NEXT_DROP] = "error-drop"
  },
};
/* *INDENT-ON* */

/*
 * End of packet-generator client node
 */

/*
 * Beginning of packet-generation server node
 */

/* Registration struct for a graph node */
vlib_node_registration_t hicn_pg_server_node;

/* Stats, which end up called "error" even though they aren't... */
#define foreach_icnpg_server_error		\
_(PROCESSED, "hICN PG Server packets processed")	\
_(DROPPED, "hICN PG Server packets dropped")

typedef enum
{
#define _(sym,str) HICNPG_SERVER_ERROR_##sym,
  foreach_icnpg_server_error
#undef _
    HICNPG_SERVER_N_ERROR,
} icnpg_server_error_t;

static char *icnpg_server_error_strings[] = {
#define _(sym,string) string,
  foreach_icnpg_server_error
#undef _
};

/*
 * Next graph nodes, which reference the list in the actual registration
 * block below
 */
typedef enum
{
  HICNPG_SERVER_NEXT_V4_LOOKUP,
  HICNPG_SERVER_NEXT_V6_LOOKUP,
  HICNPG_SERVER_NEXT_FACE_IP4_INPUT,
  HICNPG_SERVER_NEXT_FACE_IP6_INPUT,
  HICNPG_SERVER_NEXT_DROP,
  HICNPG_SERVER_N_NEXT,
} icnpg_server_next_t;

/* Trace context struct */
typedef struct
{
  u32 next_index;
  u32 sw_if_index;
  u8 pkt_type;
  u16 msg_type;
} hicnpg_server_trace_t;

/* packet trace format function */
static u8 *
format_icnpg_server_trace (u8 * s, va_list * args)
{
  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
  hicnpg_server_trace_t *t = va_arg (*args, hicnpg_server_trace_t *);

  s =
    format (s,
	    "HICNPG SERVER: pkt: %d, msg %d, sw_if_index %d, next index %d",
	    (int) t->pkt_type, (int) t->msg_type, t->sw_if_index,
	    t->next_index);
  return (s);
}

/*
 * Node function for the icn packet-generator server.
 */
static uword
hicnpg_node_server_fn (vlib_main_t * vm,
		       vlib_node_runtime_t * node, vlib_frame_t * frame)
{
  u32 n_left_from, *from, *to_next;
  icnpg_server_next_t next_index;
  u32 pkts_processed = 0, pkts_dropped = 0;
  u32 bi0, bi1;
  vlib_buffer_t *b0, *b1;
  u8 pkt_type0 = 0, pkt_type1 = 0;
  u16 msg_type0 = 0, msg_type1 = 0;
  hicn_header_t *hicn0 = NULL, *hicn1 = NULL;
  hicn_name_t name0, name1;
  u16 namelen0, namelen1;

  hicnpg_server_main_t *hpgsm = &hicnpg_server_main;

  from = vlib_frame_vector_args (frame);

  n_left_from = frame->n_vectors;
  next_index = node->cached_next_index;

  while (n_left_from > 0)
    {
      u32 n_left_to_next;

      vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);


      while (n_left_from >= 4 && n_left_to_next >= 2)
	{
	  u32 next0 = HICNPG_SERVER_NEXT_DROP;
	  u32 next1 = HICNPG_SERVER_NEXT_DROP;
	  u8 isv6_0 = 0;
	  u8 isv6_1 = 0;
	  u32 sw_if_index0, sw_if_index1;

	  /* Prefetch next iteration. */
	  {
	    vlib_buffer_t *p2, *p3;

	    p2 = vlib_get_buffer (vm, from[2]);
	    p3 = vlib_get_buffer (vm, from[3]);

	    vlib_prefetch_buffer_header (p2, LOAD);
	    vlib_prefetch_buffer_header (p3, LOAD);

	    CLIB_PREFETCH (p2->data, (2 * CLIB_CACHE_LINE_BYTES), STORE);
	    CLIB_PREFETCH (p3->data, (2 * CLIB_CACHE_LINE_BYTES), STORE);
	  }

	  /*
	   * speculatively enqueue b0 and b1 to the current
	   * next frame
	   */
	  to_next[0] = bi0 = from[0];
	  to_next[1] = bi1 = from[1];
	  from += 2;
	  to_next += 2;
	  n_left_from -= 2;
	  n_left_to_next -= 2;

	  b0 = vlib_get_buffer (vm, bi0);
	  b1 = vlib_get_buffer (vm, bi1);

	  sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX];
	  sw_if_index1 = vnet_buffer (b1)->sw_if_index[VLIB_RX];

	  if (hicn_interest_parse_pkt (b0, &name0, &namelen0, &hicn0, &isv6_0)
	      == HICN_ERROR_NONE)
	    {
	      /* this node grabs only interests */
	      vlib_buffer_t *rb = NULL;
	      rb = vlib_get_buffer (vm, hpgsm->pgen_svr_buffer_idx);

	      isv6_0 ? convert_interest_to_data_v6 (vm, b0, rb,
						    bi0) :
		convert_interest_to_data_v4 (vm, b0, rb, bi0);

	      next0 =
		isv6_0 ? HICNPG_SERVER_NEXT_V6_LOOKUP :
		HICNPG_SERVER_NEXT_V4_LOOKUP;
	      /* if hicn_underneath ,the following will results as next0 = HICNPG_SERVER_NEXT_DATA_LOOKUP */
	      next0 += 2 * hpgsm->hicn_underneath;
	    }
	  if (hicn_interest_parse_pkt (b1, &name1, &namelen1, &hicn1, &isv6_1)
	      == HICN_ERROR_NONE)
	    {
	      /* this node grabs only interests */
	      vlib_buffer_t *rb = NULL;
	      rb = vlib_get_buffer (vm, hpgsm->pgen_svr_buffer_idx);

	      isv6_1 ? convert_interest_to_data_v6 (vm, b1, rb,
						    bi1) :
		convert_interest_to_data_v4 (vm, b1, rb, bi1);

	      next1 =
		isv6_1 ? HICNPG_SERVER_NEXT_V6_LOOKUP :
		HICNPG_SERVER_NEXT_V4_LOOKUP;
	      /* if hicn_underneath ,the following will results as next0 = HICNPG_SERVER_NEXT_DATA_LOOKUP */
	      next1 += 2 * hpgsm->hicn_underneath;
	    }
	  pkts_processed += 2;

	  if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)))
	    {
	      if (b0->flags & VLIB_BUFFER_IS_TRACED)
		{
		  hicnpg_server_trace_t *t =
		    vlib_add_trace (vm, node, b0, sizeof (*t));
		  t->pkt_type = pkt_type0;
		  t->msg_type = msg_type0;
		  t->sw_if_index = sw_if_index0;
		  t->next_index = next0;
		}
	      if (b1->flags & VLIB_BUFFER_IS_TRACED)
		{
		  hicnpg_server_trace_t *t =
		    vlib_add_trace (vm, node, b1, sizeof (*t));
		  t->pkt_type = pkt_type1;
		  t->msg_type = msg_type1;
		  t->sw_if_index = sw_if_index1;
		  t->next_index = next1;
		}
	    }
	  if (next0 == HICNPG_SERVER_NEXT_DROP)
	    {
	      pkts_dropped++;
	    }
	  if (next1 == HICNPG_SERVER_NEXT_DROP)
	    {
	      pkts_dropped++;
	    }
	  /*
	   * verify speculative enqueues, maybe switch current
	   * next frame
	   */
	  vlib_validate_buffer_enqueue_x2 (vm, node, next_index,
					   to_next, n_left_to_next,
					   bi0, bi1, next0, next1);
	}

      while (n_left_from > 0 && n_left_to_next > 0)
	{
	  u32 next0 = HICNPG_SERVER_NEXT_DROP;
	  u32 sw_if_index0 = ~0;
	  u8 isv6_0 = 0;

	  /* speculatively enqueue b0 to the current next frame */
	  bi0 = from[0];
	  to_next[0] = bi0;
	  from += 1;
	  to_next += 1;
	  n_left_from -= 1;
	  n_left_to_next -= 1;

	  b0 = vlib_get_buffer (vm, bi0);

	  sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX];


	  if (hicn_interest_parse_pkt (b0, &name0, &namelen0, &hicn0, &isv6_0)
	      == HICN_ERROR_NONE)
	    {
	      /* this node grabs only interests */
	      vlib_buffer_t *rb = NULL;
	      rb = vlib_get_buffer (vm, hpgsm->pgen_svr_buffer_idx);

	      isv6_0 ? convert_interest_to_data_v6 (vm, b0, rb,
						    bi0) :
		convert_interest_to_data_v4 (vm, b0, rb, bi0);

	      next0 =
		isv6_0 ? HICNPG_SERVER_NEXT_V6_LOOKUP :
		HICNPG_SERVER_NEXT_V4_LOOKUP;
	      /* if hicn_underneath ,the following will results as next0 = HICNPG_SERVER_NEXT_DATA_LOOKUP */
	      next0 += 2 * hpgsm->hicn_underneath;
	    }
	  if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)
			     && (b0->flags & VLIB_BUFFER_IS_TRACED)))
	    {
	      hicnpg_server_trace_t *t =
		vlib_add_trace (vm, node, b0, sizeof (*t));
	      t->pkt_type = pkt_type0;
	      t->msg_type = msg_type0;
	      t->sw_if_index = sw_if_index0;
	      t->next_index = next0;
	    }
	  pkts_processed += 1;

	  if (next0 == HICNPG_SERVER_NEXT_DROP)
	    {
	      pkts_dropped++;
	    }
	  /*
	   * verify speculative enqueue, maybe switch current
	   * next frame
	   */
	  vlib_validate_buffer_enqueue_x1 (vm, node, next_index,
					   to_next, n_left_to_next,
					   bi0, next0);
	}

      vlib_put_next_frame (vm, node, next_index, n_left_to_next);
    }

  vlib_node_increment_counter (vm, hicn_pg_server_node.index,
			       HICNPG_SERVER_ERROR_PROCESSED, pkts_processed);
  vlib_node_increment_counter (vm, hicn_pg_server_node.index,
			       HICNPG_SERVER_ERROR_DROPPED, pkts_dropped);

  return (frame->n_vectors);
}

void
convert_interest_to_data_v4 (vlib_main_t * vm, vlib_buffer_t * b0,
			     vlib_buffer_t * rb, u32 bi0)
{
  hicn_header_t *h0 = vlib_buffer_get_current (b0);

  /* Get the packet length */
  u16 pkt_len = clib_net_to_host_u16 (h0->v4.ip.len);

  /*
   * Rule of thumb: We want the size of the IP packet to be <= 1500 bytes
   */
  u16 bytes_to_copy = rb->current_length;
  if ((bytes_to_copy + pkt_len) > 1500)
    {
      bytes_to_copy = 1500 - pkt_len;
    }
  /* Add content to the data packet */
  vlib_buffer_add_data (vm, &bi0, rb->data, bytes_to_copy);

  b0 = vlib_get_buffer (vm, bi0);

  h0 = vlib_buffer_get_current (b0);

  ip4_address_t src_addr = h0->v4.ip.saddr;
  h0->v4.ip.saddr = h0->v4.ip.daddr;
  h0->v4.ip.daddr = src_addr;

  h0->v4.ip.len = clib_host_to_net_u16 (vlib_buffer_length_in_chain (vm, b0));
  h0->v4.ip.csum = ip4_header_checksum ((ip4_header_t *) & (h0->v4.ip));
  calculate_tcp_checksum_v4 (vm, b0);
}

void
convert_interest_to_data_v6 (vlib_main_t * vm, vlib_buffer_t * b0,
			     vlib_buffer_t * rb, u32 bi0)
{
  hicn_header_t *h0 = vlib_buffer_get_current (b0);

  /* Get the packet length */
  uint16_t pkt_len =
    clib_net_to_host_u16 (h0->v6.ip.len) + sizeof (ip6_header_t);

  /*
   * Figure out how many bytes we can add to the content
   *
   * Rule of thumb: We want the size of the IP packet to be <= 1400 bytes
   */
  u16 bytes_to_copy = rb->current_length;
  if ((bytes_to_copy + pkt_len) > 1500)
    {
      bytes_to_copy = 1500 - pkt_len;
    }
  /* Add content to the data packet */
  vlib_buffer_add_data (vm, &bi0, rb->data, bytes_to_copy);

  b0 = vlib_get_buffer (vm, bi0);

  h0 = vlib_buffer_get_current (b0);
  ip6_address_t src_addr = h0->v6.ip.saddr;
  h0->v6.ip.saddr = h0->v6.ip.daddr;
  h0->v6.ip.daddr = src_addr;

  h0->v6.ip.len = clib_host_to_net_u16 (vlib_buffer_length_in_chain
					(vm, b0) - sizeof (ip6_header_t));
  h0->v6.tcp.data_offset_and_reserved |= 0x0f;
  h0->v6.tcp.urg_ptr = htons (0xffff);

  calculate_tcp_checksum_v6 (vm, b0);
}

/* *INDENT-OFF* */
VLIB_REGISTER_NODE(hicn_pg_server_node) =
{
  .function = hicnpg_node_server_fn,
  .name = "hicnpg-server",
  .vector_size = sizeof(u32),
  .format_trace = format_icnpg_server_trace,
  .type = VLIB_NODE_TYPE_INTERNAL,
  .n_errors = ARRAY_LEN(icnpg_server_error_strings),
  .error_strings = icnpg_server_error_strings,
  .n_next_nodes = HICNPG_SERVER_N_NEXT,
  /* edit / add dispositions here */
  .next_nodes =
  {  
    [HICNPG_SERVER_NEXT_V4_LOOKUP] = "ip4-lookup",
    [HICNPG_SERVER_NEXT_V6_LOOKUP] = "ip6-lookup",
    [HICNPG_SERVER_NEXT_FACE_IP4_INPUT] = "hicn-face-ip4-input",
    [HICNPG_SERVER_NEXT_FACE_IP6_INPUT] = "hicn-face-ip6-input",
    [HICNPG_SERVER_NEXT_DROP] = "error-drop",
  },
};
/* *INDENT-ON* */

/*
 * End of packet-generator server node
 */

/*
 * fd.io coding-style-patch-verification: ON
 *
 * Local Variables: eval: (c-set-style "gnu") End:
 */