./basic_router.cpp:76:1: error: 'sai_switch_notification_t' does not name a type sai_switch_notification_t plat_switch_notification_handlers = ^ ./basic_router.cpp: In function 'const char* test_profile_get_value(sai_switch_profile_id_t, const char*)': ./basic_router.cpp:93:39: warning: statement has no effect [-Wunused-value] UNREFERENCED_PARAMETER(profile_id); ^ ./basic_router.cpp:94:37: warning: statement has no effect [-Wunused-value] UNREFERENCED_PARAMETER(variable); ^ ./basic_router.cpp: In function 'int test_profile_get_next_value(sai_switch_profile_id_t, const char**, const char**)': ./basic_router.cpp:104:39: warning: statement has no effect [-Wunused-value] UNREFERENCED_PARAMETER(profile_id); ^ ./basic_router.cpp:105:37: warning: statement has no effect [-Wunused-value] UNREFERENCED_PARAMETER(variable); ^ ./basic_router.cpp:106:34: warning: statement has no effect [-Wunused-value] UNREFERENCED_PARAMETER(value); ^ ./basic_router.cpp: At global scope: ./basic_router.cpp:111:7: error: 'service_method_table_t' does not name a type const service_method_table_t test_services = ^ ./basic_router.cpp: In function 'bool setup_one_l3_interface(sai_vlan_id_t, int, const sai_object_id_t*, MacAddress, IpAddress, IpAddress, sai_object_id_t&)': ./basic_router.cpp:151:59: error: invalid conversion from 'sai_vlan_id_t {aka short unsigned int}' to 'sai_object_id_t* {aka long unsigned int*}' [-fpermissive] sai_status_t status = sai_vlan_api->create_vlan(vlanid); ^ ./basic_router.cpp:151:59: error: too few arguments to function ./basic_router.cpp:169:26: error: 'SAI_VLAN_MEMBER_ATTR_PORT_ID' was not declared in this scope member_attr.id = SAI_VLAN_MEMBER_ATTR_PORT_ID; ^ ./basic_router.cpp:173:26: error: 'SAI_VLAN_MEMBER_ATTR_TAGGING_MODE' was not declared in this scope member_attr.id = SAI_VLAN_MEMBER_ATTR_TAGGING_MODE; ^ ./basic_router.cpp:174:33: error: 'SAI_VLAN_PORT_UNTAGGED' was not declared in this scope member_attr.value.s32 = SAI_VLAN_PORT_UNTAGGED; ^ ./basic_router.cpp:178:107: error: invalid conversion from '_sai_attribute_t*' to 'uint32_t {aka unsigned int}' [-fpermissive] status = sai_vlan_api->create_vlan_member(&vlan_member_id, member_attrs.size(), member_attrs.data()); ^ ./basic_router.cpp:178:108: error: too few arguments to function status = sai_vlan_api->create_vlan_member(&vlan_member_id, member_attrs.size(), member_attrs.data()); ^ ./basic_router.cpp:225:93: error: invalid conversion from '_sai_attribute_t*' to 'uint32_t {aka unsigned int}' [-fpermissive] status = sai_rif_api->create_router_interface(&rif_id, rif_attrs.size(), rif_attrs.data()); ^ ./basic_router.cpp:225:94: error: too few arguments to function status = sai_rif_api->create_router_interface(&rif_id, rif_attrs.size(), rif_attrs.data()); ^ ./basic_router.cpp:243:5: error: 'sai_unicast_route_entry_t' was not declared in this scope sai_unicast_route_entry_t unicast_route_entry; ^ ./basic_router.cpp:243:31: error: expected ';' before 'unicast_route_entry' sai_unicast_route_entry_t unicast_route_entry; ^ ./basic_router.cpp:244:5: error: 'unicast_route_entry' was not declared in this scope unicast_route_entry.vr_id = g_vr_id; ^ ./basic_router.cpp:249:21: error: 'SAI_ROUTE_ATTR_PACKET_ACTION' was not declared in this scope route_attr.id = SAI_ROUTE_ATTR_PACKET_ACTION; ^ ./basic_router.cpp:251:29: error: 'sai_route_api_t' has no member named 'create_route' status = sai_route_api->create_route(&unicast_route_entry, 1, &route_attr); ^ ./basic_router.cpp:268:29: error: 'sai_route_api_t' has no member named 'create_route' status = sai_route_api->create_route(&unicast_route_entry, 1, &route_attr); ^ ./basic_router.cpp: In function 'bool basic_router_setup()': ./basic_router.cpp:289:59: error: invalid conversion from 'sai_attribute_t* {aka _sai_attribute_t*}' to 'uint32_t {aka unsigned int}' [-fpermissive] status = sai_switch_api->get_switch_attribute(1, &attr); ^ ./basic_router.cpp:289:59: error: too few arguments to function ./basic_router.cpp:311:59: error: invalid conversion from 'sai_attribute_t* {aka _sai_attribute_t*}' to 'uint32_t {aka unsigned int}' [-fpermissive] status = sai_switch_api->get_switch_attribute(1, &attr); ^ ./basic_router.cpp:311:59: error: too few arguments to function ./basic_router.cpp:343:27: error: 'sai_hostif_api_t' has no member named 'set_trap_attribute' status = sai_hif_api->set_trap_attribute(SAI_HOSTIF_TRAP_ID_TTL_ERROR, &attr); ^ ./basic_router.cpp:343:46: error: 'SAI_HOSTIF_TRAP_ID_TTL_ERROR' was not declared in this scope status = sai_hif_api->set_trap_attribute(SAI_HOSTIF_TRAP_ID_TTL_ERROR, &attr); ^ ./basic_router.cpp:349:15: error: 'SAI_HOSTIF_TRAP_ATTR_TRAP_CHANNEL' was not declared in this scope attr.id = SAI_HOSTIF_TRAP_ATTR_TRAP_CHANNEL; ^ ./basic_router.cpp:350:22: error: 'SAI_HOSTIF_TRAP_CHANNEL_NETDEV' was not declared in this scope attr.value.s32 = SAI_HOSTIF_TRAP_CHANNEL_NETDEV; ^ ./basic_router.cpp:351:27: error: 'sai_hostif_api_t' has no member named 'set_trap_attribute' status = sai_hif_api->set_trap_attribute(SAI_HOSTIF_TRAP_ID_TTL_ERROR, &attr); ^ ./basic_router.cpp:363:27: error: 'sai_hostif_api_t' has no member named 'set_trap_attribute' status = sai_hif_api->set_trap_attribute(SAI_HOSTIF_TRAP_ID_ARP_REQUEST, &attr); ^ ./basic_router.cpp:363:46: error: 'SAI_HOSTIF_TRAP_ID_ARP_REQUEST' was not declared in this scope status = sai_hif_api->set_trap_attribute(SAI_HOSTIF_TRAP_ID_ARP_REQUEST, &attr); ^ ./basic_router.cpp:371:27: error: 'sai_hostif_api_t' has no member named 'set_trap_attribute' status = sai_hif_api->set_trap_attribute(SAI_HOSTIF_TRAP_ID_ARP_REQUEST, &attr); ^ ./basic_router.cpp:383:27: error: 'sai_hostif_api_t' has no member named 'set_trap_attribute' status = sai_hif_api->set_trap_attribute(SAI_HOSTIF_TRAP_ID_ARP_RESPONSE, &attr); ^ ./basic_router.cpp:383:46: error: 'SAI_HOSTIF_TRAP_ID_ARP_RESPONSE' was not declared in this scope status = sai_hif_api->set_trap_attribute(SAI_HOSTIF_TRAP_ID_ARP_RESPONSE, &attr); ^ ./basic_router.cpp:391:27: error: 'sai_hostif_api_t' has no member named 'set_trap_attribute' status = sai_hif_api->set_trap_attribute(SAI_HOSTIF_TRAP_ID_ARP_RESPONSE, &attr); ^ ./basic_router.cpp:403:27: error: 'sai_hostif_api_t' has no member named 'set_trap_attribute' status = sai_hif_api->set_trap_attribute(SAI_HOSTIF_TRAP_ID_LLDP, &attr); ^ ./basic_router.cpp:403:46: error: 'SAI_HOSTIF_TRAP_ID_LLDP' was not declared in this scope status = sai_hif_api->set_trap_attribute(SAI_HOSTIF_TRAP_ID_LLDP, &attr); ^ ./basic_router.cpp:411:27: error: 'sai_hostif_api_t' has no member named 'set_trap_attribute' status = sai_hif_api->set_trap_attribute(SAI_HOSTIF_TRAP_ID_LLDP, &attr); ^ ./basic_router.cpp:421:65: warning: converting to non-pointer type 'uint32_t {aka unsigned int}' from NULL [-Wconversion-null] status = sai_vr_api->create_virtual_router(&g_vr_id, 0, NULL); ^ ./basic_router.cpp:421:65: error: too few arguments to function ./basic_router.cpp:453:19: error: 'SAI_PORT_ATTR_FDB_LEARNING' was not declared in this scope attr.id = SAI_PORT_ATTR_FDB_LEARNING; ^ ./basic_router.cpp:454:26: error: 'SAI_PORT_LEARN_MODE_HW' was not declared in this scope attr.value.s32 = SAI_PORT_LEARN_MODE_HW; ^ ./basic_router.cpp:506:19: error: 'SAI_HOSTIF_ATTR_RIF_OR_PORT_ID' was not declared in this scope attr.id = SAI_HOSTIF_ATTR_RIF_OR_PORT_ID; ^ ./basic_router.cpp:511:71: error: 'HOSTIF_NAME_SIZE' was not declared in this scope strncpy((char *)&attr.value.chardata, g_intfAlias[i].c_str(), HOSTIF_NAME_SIZE); ^ ./basic_router.cpp:516:87: error: invalid conversion from '_sai_attribute_t*' to 'uint32_t {aka unsigned int}' [-fpermissive] status = sai_hif_api->create_hostif(&hif_id, attr_list.size(), attr_list.data()); ^ ./basic_router.cpp:516:88: error: too few arguments to function status = sai_hif_api->create_hostif(&hif_id, attr_list.size(), attr_list.data()); ^ In file included from ./neighbor_mgr.h:31:0, from ./basic_router.cpp:46: ./basic_router.cpp:525:41: error: 'SAI_OBJECT_TYPE_HOST_INTERFACE' was not declared in this scope if (!SAI_OID_TYPE_CHECK(hif_id, SAI_OBJECT_TYPE_HOST_INTERFACE)) ^ ./basic_router.h:29:78: note: in definition of macro 'SAI_OID_TYPE_CHECK' #define SAI_OID_TYPE_CHECK(oid, type) (sai_object_type_query(oid) == type) ^ ./basic_router.cpp:547:28: error: 'SAI_FDB_ENTRY_STATIC' was not declared in this scope SAI_FDB_ENTRY_STATIC, port_list[i], SAI_PACKET_ACTION_FORWARD)) ^ In file included from ../gtest-1.7.0/include/gtest/gtest.h:1929:0, from ./basic_router.cpp:23: ./basic_router.cpp: In static member function 'static void saiUnitTest::SetUpTestCase()': ./basic_router.cpp:575:42: error: 'service_method_table_t' was not declared in this scope sai_api_initialize(0, (service_method_table_t *)&test_services)); ^ ./basic_router.cpp:575:66: error: expected primary-expression before ')' token sai_api_initialize(0, (service_method_table_t *)&test_services)); ^ ./basic_router.cpp:575:68: error: 'test_services' was not declared in this scope sai_api_initialize(0, (service_method_table_t *)&test_services)); ^ ./basic_router.cpp:600:33: error: 'SAI_API_HOST_INTERFACE' was not declared in this scope sai_api_query(SAI_API_HOST_INTERFACE, (void**)&sai_hif_api)); ^ ./basic_router.cpp:628:47: error: 'SAI_LOG_DEBUG' was not declared in this scope sai_log_set(SAI_API_SWITCH, SAI_LOG_DEBUG)); ^ ./basic_router.cpp:631:45: error: 'SAI_LOG_DEBUG' was not declared in this scope sai_log_set(SAI_API_PORT, SAI_LOG_DEBUG)); ^ ./basic_router.cpp:634:45: error: 'SAI_LOG_DEBUG' was not declared in this scope sai_log_set(SAI_API_VLAN, SAI_LOG_DEBUG)); ^ ./basic_router.cpp:637:55: error: 'SAI_LOG_DEBUG' was not declared in this scope sai_log_set(SAI_API_VIRTUAL_ROUTER, SAI_LOG_DEBUG)); ^ ./basic_router.cpp:640:57: error: 'SAI_LOG_DEBUG' was not declared in this scope sai_log_set(SAI_API_ROUTER_INTERFACE, SAI_LOG_DEBUG)); ^ ./basic_router.cpp:644:31: error: 'SAI_API_HOST_INTERFACE' was not declared in this scope sai_log_set(SAI_API_HOST_INTERFACE, SAI_LOG_DEBUG)); ^ ./basic_router.cpp:644:55: error: 'SAI_LOG_DEBUG' was not declared in this scope sai_log_set(SAI_API_HOST_INTERFACE, SAI_LOG_DEBUG)); ^ ./basic_router.cpp:647:49: error: 'SAI_LOG_DEBUG' was not declared in this scope sai_log_set(SAI_API_NEIGHBOR, SAI_LOG_DEBUG)); ^ ./basic_router.cpp:650:46: error: 'SAI_LOG_DEBUG' was not declared in this scope sai_log_set(SAI_API_ROUTE, SAI_LOG_DEBUG)); ^ ./basic_router.cpp:653:49: error: 'SAI_LOG_DEBUG' was not declared in this scope sai_log_set(SAI_API_NEXT_HOP, SAI_LOG_DEBUG)); ^ ./basic_router.cpp:656:55: error: 'SAI_LOG_DEBUG' was not declared in this scope sai_log_set(SAI_API_NEXT_HOP_GROUP, SAI_LOG_DEBUG)); ^ In file included from ../gtest-1.7.0/include/gtest/gtest.h:58:0, from ./basic_router.cpp:23: ./basic_router.cpp:660:37: error: 'sai_switch_api_t' has no member named 'initialize_switch' ASSERT_TRUE(sai_switch_api->initialize_switch); ^ In file included from ../gtest-1.7.0/include/gtest/gtest.h:1929:0, from ./basic_router.cpp:23: ./basic_router.cpp:662:35: error: 'sai_switch_api_t' has no member named 'initialize_switch' sai_switch_api->initialize_switch(0, "0xb850", "", ^ ./basic_router.cpp:663:28: error: 'plat_switch_notification_handlers' was not declared in this scope &plat_switch_notification_handlers)); ^ ./basic_router.cpp:675:61: error: invalid conversion from 'sai_attribute_t* {aka _sai_attribute_t*}' to 'sai_object_id_t {aka long unsigned int}' [-fpermissive] sai_switch_api->set_switch_attribute(&attr)); ^ ./basic_router.cpp:675:61: error: too few arguments to function In file included from ../gtest-1.7.0/include/gtest/gtest.h:58:0, from ./basic_router.cpp:23: ./basic_router.cpp: In function 'void tearup_tests()': ./basic_router.cpp:924:33: error: 'sai_switch_api_t' has no member named 'shutdown_switch' ASSERT_TRUE(sai_switch_api->shutdown_switch); ^ ./basic_router.cpp:925:21: error: 'sai_switch_api_t' has no member named 'shutdown_switch' sai_switch_api->shutdown_switch(false); ^ make: *** [../obj/basic_router.o] Error 1