Exemplo n.º 1
0
void
test_flowinfo_ipv6_nd_ns_sll_adddel(void) {
  size_t s;
  uint8_t addr[OFP_ETH_ALEN];

  TEST_ASSERT_OBJECTS();

  /* Add the IPv6 ND NS source link-layer address match. */
  for (s = 0; s < ARRAY_LEN(test_flow); s++) {
    OS_MEMCPY(addr, macsrc, sizeof(addr));
    addr[sizeof(addr) - 1] = TEST_ETH_ADDR_LSB(s);
    FLOW_ADD_IPV6_ND_SLL_MATCH(test_flow[s], addr);
  }

  /* Run the sideeffect-free scenario. */
  TEST_SCENARIO_FLOWINFO_SEF(flowinfo);

  /* Reset the matches.  Mind the prerequisite. */
  for (s = 0; s < ARRAY_LEN(test_flow); s++) {
    TAILQ_INIT(&test_flow[s]->match_list);
    FLOW_ADD_IPV6_ND_UT_PREREQUISITE(test_flow[s]);
  }
}
Exemplo n.º 2
0
void
test_flowinfo_arp_tha_w_adddel(void) {
  size_t s;
  uint8_t addr[OFP_ETH_ALEN];

  TEST_ASSERT_OBJECTS();

  /* Add the ARP MAC target address matches. */
  for (s = 0; s < ARRAY_LEN(test_flow); s++) {
    OS_MEMCPY(addr, mactgt, sizeof(addr));
    addr[sizeof(addr) - 1] = TEST_ETH_ADDR_LSB(s);
    FLOW_ADD_ARP_THA_W_MATCH(test_flow[s], addr, macmask);
  }

  /* Run the sideeffect-free scenario. */
  TEST_SCENARIO_FLOWINFO_SEF(flowinfo);

  /* Reset the matches.  Mind the prerequisite. */
  for (s = 0; s < ARRAY_LEN(test_flow); s++) {
    TAILQ_INIT(&test_flow[s]->match_list);
    FLOW_ADD_ARP_PREREQUISITE(test_flow[s]);
  }
}