-/* Returns true if at least one controller is connected (regardless of whether
- * those controllers are believed to have authenticated and accepted this
- * switch), false if none of them are connected. */
-static bool
-any_controller_is_connected(const struct fail_open *fo)
-{
- size_t i;
-
- for (i = 0; i < fo->n_controllers; i++) {
- if (rconn_is_connected(fo->controllers[i])) {
- return true;
- }
- }
- return false;
-}
-
-/* Returns true if at least one controller is believed to have authenticated
- * and accepted this switch, false otherwise. */
-static bool
-any_controller_is_admitted(const struct fail_open *fo)
-{
- size_t i;
-
- for (i = 0; i < fo->n_controllers; i++) {
- if (rconn_is_admitted(fo->controllers[i])) {
- return true;
- }
- }
- return false;
-}
-
-static void
-send_bogus_packet_in(struct fail_open *fo, struct rconn *rconn)
-{
- uint8_t mac[ETH_ADDR_LEN];
- struct ofpbuf *opi;
- struct ofpbuf b;
-
- /* Compose ofp_packet_in. */
- ofpbuf_init(&b, 128);
- eth_addr_nicira_random(mac);
- compose_benign_packet(&b, "Open vSwitch Controller Probe", 0xa033, mac);
- opi = make_packet_in(pktbuf_get_null(), OFPP_LOCAL, OFPR_NO_MATCH, &b, 64);
- ofpbuf_uninit(&b);
-
- /* Send. */
- rconn_send_with_limit(rconn, opi, fo->bogus_packet_counter, 1);
-}
-