aboutsummaryrefslogtreecommitdiffstats
path: root/doxygen
AgeCommit message (Expand)AuthorFilesLines
2018-10-17Update to doxygen documentation for release 18.10Marco Varlese1-0/+2
2018-08-03API: Remove legacy vlibsocket code.Ole Troan1-1/+0
2018-04-30Add reference to 18.04 test framework documentationChris Luke1-1/+3
2018-04-04Doc updates prior to branchChris Luke2-5/+9
2018-02-02Add link to 18.01 test framework documentation.Dave Wallace1-0/+1
2018-01-30VPP-899: Run VPP under SELinuxBilly McFall2-1/+2
2018-01-24docs: Clean up TOCDave Wallace1-0/+2
2017-12-15apps: refactor uri and update build infraFlorin Coras1-1/+0
2017-11-03Add C++ files to DoxygenChris Luke1-1/+1
2017-09-28General documentation updatesChris Luke6-5/+23
2017-09-25Add binary API documentationDave Barach1-0/+1
2017-06-22NAT64: documentationMatus Fabian1-0/+1
2017-06-09Sample plugin: Add sample plugin documentationRay Kinsella2-2/+2
2017-05-30Flowprobe: Stateful flows and IPv6, L4 recordingOle Troan1-1/+1
2017-05-10doxygen: Fix some pathsChris Luke1-1/+3
2017-05-05First commit SR MPLSPablo Camarillo1-0/+1
2017-03-29Bugfixing and documentation for SRv6Pablo Camarillo2-9/+10
2017-02-22Add ref to test framework docs in doxygen output.Dave Wallace2-5/+8
2017-02-02Added support for openSUSEMarco Varlese1-1/+4
2017-01-11Remove vcgn pluginDamjan Marion1-2/+1
2017-01-10Revert "vppctl: bash completion for vppctl commands"Damjan Marion1-8/+17
2017-01-09vppctl: bash completion for vppctl commandsPadraig Connolly1-17/+8
2017-01-01Move java,lua api and remaining plugins to src/Damjan Marion1-4/+3
2016-12-28Repair Doxygen build infrastructureChris Luke2-11/+29
2016-11-28Add support for using documentation siphons in multiple waysChris Luke19-32/+199
2016-11-28dpdk: add ipsec cryptodev supportSergio Gonzalez Monroy1-0/+1
2016-10-27Per-packet IPFIX record generation pluginDave Barach1-0/+1
2016-10-04Minor tweaks to hqos docChris Luke1-3/+4
2016-09-27Fix missing output in generated CLI/configChris Luke3-7/+8
2016-09-23Enable doc building on MacOSChris Luke1-1/+25
2016-09-21Refactor pre-Doxy siphon scripts; VPP-396Chris Luke24-657/+1486
2016-09-21Move doxytags file to html output directoryChris Luke1-1/+1
2016-09-21Copy the 16.09 release notes to masterChris Luke1-0/+1
2016-09-20Add structure to some of the documentation; VPP-223Chris Luke2-1/+15
2016-09-09Check for zero-sized Graphvix config file on Ubuntu; VPP-396Chris Luke1-1/+2
2016-09-09On Ubuntu check for graphviz system configChris Luke1-0/+3
2016-09-07VPP-346 Improve Doxygen include path mechanismChris Luke2-23/+55
2016-09-06VPP-346 More VPP doc fixesChris Luke3-15/+48
2016-09-02VPP-221 Improve doxygen dependency checkChris Luke1-1/+5
2016-09-01VPP-346 A swathe of doc fixesChris Luke4-16/+94
2016-08-31VPP-221 Loosen Doxygen CLI command struct parserChris Luke2-1/+2
2016-08-31VPP-221 CLI auto-documentation infrastructureChris Luke6-5/+793
2016-08-06Add DPDK definition to DOXYGENKeith Burns (alagalah)1-2/+3
2016-07-26Fix missing include dirs in doxygenChris Luke1-1/+1
2016-07-07Add some doxygen tagsDave Barach1-0/+1
2016-05-16VPP-57 Add missing license headers in doc filesChris Luke1-0/+22
2016-05-15VPP-62 Add a doxy filter to enable vpe.api docChris Luke3-5/+67
2016-05-13VPP-57 Add Doxygen to VPPChris Luke6-0/+2717
, const igmp_group_t * group) { igmp_pkt_build_report_t br; IGMP_DBG ("state-change-group: %U", format_igmp_key, group->key); igmp_pkt_build_report_init (&br, sw_if_index); igmp_pkt_report_v3_add_group (&br, group, IGMP_MEMBERSHIP_GROUP_allow_new_sources); igmp_pkt_report_v3_send (&br); } static void igmp_resend_state_change_group_report_v3 (u32 gi, void *data) { igmp_config_t *config; igmp_group_t *group; group = igmp_group_get (gi); config = igmp_config_get (group->config); igmp_timer_retire (&group->timers[IGMP_GROUP_TIMER_RESEND_REPORT]); igmp_send_state_change_group_report_v3 (config->sw_if_index, group); if (++group->n_reports_sent < config->robustness_var) { group->timers[IGMP_GROUP_TIMER_RESEND_REPORT] = igmp_timer_schedule (igmp_timer_type_get (IGMP_TIMER_REPORT_INTERVAL), igmp_group_index (group), igmp_resend_state_change_group_report_v3, NULL); } } int igmp_listen (vlib_main_t * vm, igmp_filter_mode_t mode, u32 sw_if_index, const ip46_address_t * saddrs, const ip46_address_t * gaddr) { const ip46_address_t *saddr; igmp_config_t *config; igmp_group_t *group; /* * RFC 3376 Section 2 " For a given combination of socket, interface, and multicast address, * only a single filter mode and source list can be in effect at any one * time. However, either the filter mode or the source list, or both, * may be changed by subsequent IPMulticastListen requests that specify * the same socket, interface, and multicast address. Each subsequent * request completely replaces any earlier request for the given socket, * interface and multicast address." */ int rv = 0; IGMP_DBG ("listen: (%U, %U) %U %U", format_igmp_src_addr_list, saddrs, format_igmp_key, gaddr, format_vnet_sw_if_index_name, vnet_get_main (), sw_if_index, format_igmp_filter_mode, mode); /* * find configuration, if it doesn't exist, then this interface is * not IGMP enabled */ config = igmp_config_lookup (sw_if_index); if (!config) { rv = VNET_API_ERROR_INVALID_INTERFACE; goto error; } if (config->mode != IGMP_MODE_HOST) { rv = VNET_API_ERROR_INVALID_INTERFACE; goto error; } /* find igmp group, if it doesn't exist, create new */ group = igmp_group_lookup (config, gaddr); if (!group) { group = igmp_group_alloc (config, gaddr, mode); /* new group implies create all sources */ vec_foreach (saddr, saddrs) { igmp_group_src_update (group, saddr, IGMP_MODE_HOST); } /* * Send state changed event report for the group. * * RFC3376 Section 5.1 * "To cover the possibility of the State-Change Report being missed by * one or more multicast routers, it is retransmitted [Robustness * Variable] - 1 more times, at intervals chosen at random from the * range (0, [Unsolicited Report Interval])." */ igmp_send_state_change_group_report_v3 (config->sw_if_index, group); igmp_timer_retire (&group->timers[IGMP_GROUP_TIMER_RESEND_REPORT]); group->n_reports_sent = 1; group->timers[IGMP_GROUP_TIMER_RESEND_REPORT] = igmp_timer_schedule (igmp_timer_type_get (IGMP_TIMER_REPORT_INTERVAL), igmp_group_index (group), igmp_resend_state_change_group_report_v3, NULL); } else { IGMP_DBG ("... update (%U, %U) %U %U", format_igmp_src_addr_list, saddrs, format_igmp_key, gaddr, format_vnet_sw_if_index_name, vnet_get_main (), sw_if_index, format_igmp_filter_mode, mode); /* * RFC 3367 Section 5.1 * * Old State New State State-Change Record Sent * --------- --------- ------------------------ * * 1) INCLUDE (A) INCLUDE (B) ALLOW (B-A), BLOCK (A-B) * 2) EXCLUDE (A) EXCLUDE (B) ALLOW (A-B), BLOCK (B-A) * 3) INCLUDE (A) EXCLUDE (B) TO_EX (B) * 4) EXCLUDE (A) INCLUDE (B) TO_IN (B) * * N.B. We do not split state-change records for pending transfer * hence there is no merge logic required. */ if (IGMP_FILTER_MODE_INCLUDE == mode) { ip46_address_t *added, *removed; igmp_pkt_build_report_t br; /* * find the list of sources that have been added and removed from * the include set */ removed = igmp_group_present_minus_new (group, IGMP_FILTER_MODE_INCLUDE, saddrs); added = igmp_group_new_minus_present (group, IGMP_FILTER_MODE_INCLUDE, saddrs); if (!(vec_len (added) || vec_len (removed))) /* no change => done */ goto error; igmp_pkt_build_report_init (&br, config->sw_if_index); if (vec_len (added)) { igmp_pkt_report_v3_add_report (&br, group->key, added, IGMP_MEMBERSHIP_GROUP_allow_new_sources); } if (vec_len (removed)) { igmp_pkt_report_v3_add_report (&br, group->key, removed, IGMP_MEMBERSHIP_GROUP_block_old_sources); } IGMP_DBG ("... added %U", format_igmp_src_addr_list, added); IGMP_DBG ("... removed %U", format_igmp_src_addr_list, removed); igmp_pkt_report_v3_send (&br); /* * clear the group of the old sources and populate it with the new * set requested */ igmp_group_free_all_srcs (group); vec_foreach (saddr, saddrs) { igmp_group_src_update (group, saddr, IGMP_MODE_HOST); } if (0 == igmp_group_n_srcs (group, mode)) igmp_group_clear (&group); vec_free (added); vec_free (removed); } else { /* * The control plane is excluding some sources. * - First; check for those that are present in the include list * - Second; check add them to the exclude list * * TODO */ } } error: return (rv); } static walk_rc_t igmp_sw_if_down (vnet_main_t * vnm, u32 sw_if_index, void *ctx) { igmp_config_t *config; config = igmp_config_lookup (sw_if_index); IGMP_DBG ("down: %U", format_vnet_sw_if_index_name, vnet_get_main (), sw_if_index); if (NULL != config) { igmp_clear_config (config); } return (WALK_CONTINUE); } /** \brief igmp hardware interface link up down @param vnm - vnet main @param hw_if_index - interface hw_if_index @param flags - hw interface flags If an interface goes down, remove its (S,G)s. */ static clib_error_t * igmp_hw_interface_link_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags) { clib_error_t *error = NULL; /* remove igmp state from down interfaces */ if (!(flags & VNET_HW_INTERFACE_FLAG_LINK_UP)) vnet_hw_interface_walk_sw (vnm, hw_if_index, igmp_sw_if_down, NULL); return error; } VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION (igmp_hw_interface_link_up_down); int igmp_enable_disable (u32 sw_if_index, u8 enable, igmp_mode_t mode) { igmp_config_t *config; igmp_main_t *im = &igmp_main; u32 mfib_index; IGMP_DBG ("%s: %U", (enable ? "Enabled" : "Disabled"), format_vnet_sw_if_index_name, vnet_get_main (), sw_if_index); /* *INDENT-OFF* */ fib_route_path_t via_itf_path = { .frp_proto = fib_proto_to_dpo (FIB_PROTOCOL_IP4), .frp_addr = zero_addr, .frp_sw_if_index = sw_if_index, .frp_fib_index = 0, .frp_weight = 1, .frp_mitf_flags = MFIB_ITF_FLAG_ACCEPT, }; fib_route_path_t for_us_path = { .frp_proto = fib_proto_to_dpo (FIB_PROTOCOL_IP4), .frp_addr = zero_addr, .frp_sw_if_index = 0xffffffff, .frp_fib_index = 1, .frp_weight = 0, .frp_flags = FIB_ROUTE_PATH_LOCAL, .frp_mitf_flags = MFIB_ITF_FLAG_FORWARD, }; /* *INDENT-ON* */ /* find configuration, if it doesn't exist, create new */ config = igmp_config_lookup (sw_if_index); mfib_index = mfib_table_get_index_for_sw_if_index (FIB_PROTOCOL_IP4, sw_if_index); if (!config && enable) { u32 ii; vec_validate_init_empty (im->igmp_config_by_sw_if_index, sw_if_index, ~0); pool_get (im->configs, config); clib_memset (config, 0, sizeof (igmp_config_t)); config->sw_if_index = sw_if_index; config->igmp_group_by_key = hash_create_mem (0, sizeof (igmp_key_t), sizeof (uword)); config->robustness_var = IGMP_DEFAULT_ROBUSTNESS_VARIABLE; config->mode = mode; config->proxy_device_id = ~0; for (ii = 0; ii < IGMP_CONFIG_N_TIMERS; ii++) config->timers[ii] = IGMP_TIMER_ID_INVALID; if (IGMP_MODE_ROUTER == mode) { config->timers[IGMP_CONFIG_TIMER_GENERAL_QUERY] = igmp_timer_schedule (igmp_timer_type_get (IGMP_TIMER_QUERY), igmp_config_index (config), igmp_send_general_query, NULL); } config->adj_index = adj_mcast_add_or_lock (FIB_PROTOCOL_IP4, VNET_LINK_IP4, config->sw_if_index); im->igmp_config_by_sw_if_index[config->sw_if_index] = (config - im->configs); { vec_validate (im->n_configs_per_mfib_index, mfib_index); im->n_configs_per_mfib_index[mfib_index]++; if (1 == im->n_configs_per_mfib_index[mfib_index]) { /* first config in this FIB */ mfib_table_lock (mfib_index, FIB_PROTOCOL_IP4, MFIB_SOURCE_IGMP); mfib_table_entry_path_update (mfib_index, &mpfx_general_query, MFIB_SOURCE_IGMP, MFIB_ENTRY_FLAG_NONE, &for_us_path); mfib_table_entry_path_update (mfib_index, &mpfx_report, MFIB_SOURCE_IGMP, MFIB_ENTRY_FLAG_NONE, &for_us_path); } mfib_table_entry_path_update (mfib_index, &mpfx_general_query, MFIB_SOURCE_IGMP, MFIB_ENTRY_FLAG_NONE, &via_itf_path); mfib_table_entry_path_update (mfib_index, &mpfx_report, MFIB_SOURCE_IGMP, MFIB_ENTRY_FLAG_NONE, &via_itf_path); } } else if (config && !enable) { vec_validate (im->n_configs_per_mfib_index, mfib_index); im->n_configs_per_mfib_index[mfib_index]--; if (0 == im->n_configs_per_mfib_index[mfib_index]) { /* last config in this FIB */ mfib_table_entry_path_remove (mfib_index, &mpfx_general_query, MFIB_SOURCE_IGMP, &for_us_path); mfib_table_entry_path_remove (mfib_index, &mpfx_report, MFIB_SOURCE_IGMP, &for_us_path); mfib_table_unlock (mfib_index, FIB_PROTOCOL_IP4, MFIB_SOURCE_IGMP); } mfib_table_entry_path_remove (mfib_index, &mpfx_general_query, MFIB_SOURCE_IGMP, &via_itf_path); mfib_table_entry_path_remove (mfib_index, &mpfx_report, MFIB_SOURCE_IGMP, &via_itf_path); /* * remove interface from proxy device * if this device is upstream, delete proxy device */ if (config->mode == IGMP_MODE_ROUTER) igmp_proxy_device_add_del_interface (config->proxy_device_id, config->sw_if_index, 0); else if (config->mode == IGMP_MODE_HOST) igmp_proxy_device_add_del (config->proxy_device_id, config->sw_if_index, 0); igmp_clear_config (config); im->igmp_config_by_sw_if_index[config->sw_if_index] = ~0; hash_free (config->igmp_group_by_key); pool_put (im->configs, config); } else { return -1; } return (0); } /** \brief igmp initialization @param vm - vlib main initialize igmp plugin. Initialize igmp_main, set mfib to allow igmp traffic. */ static clib_error_t * igmp_init (vlib_main_t * vm) { igmp_main_t *im = &igmp_main; im->igmp_api_client_by_client_index = hash_create (0, sizeof (u32)); im->logger = vlib_log_register_class ("igmp", 0); IGMP_DBG ("initialized"); return (0); } /* *INDENT-OFF* */ VLIB_INIT_FUNCTION (igmp_init) = { .runs_after = VLIB_INITS("ip4_lookup_init"), }; VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, .description = "Internet Group Management Protocol (IGMP)", }; /* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */