- 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(fo->controller, opi, fo->bogus_packet_counter, 1);
+ struct eth_addr mac;
+ struct dp_packet b;
+
+ dp_packet_init(&b, 128);
+ eth_addr_nicira_random(&mac);
+ compose_rarp(&b, mac);
+
+ struct ofproto_async_msg am = {
+ .oam = OAM_PACKET_IN,
+ .pin = {
+ .up = {
+ .packet = dp_packet_data(&b),
+ .len = dp_packet_size(&b),
+ .flow_metadata = MATCH_CATCHALL_INITIALIZER,
+ .flow_metadata.flow.in_port.ofp_port = OFPP_LOCAL,
+ .flow_metadata.wc.masks.in_port.ofp_port
+ = u16_to_ofp(UINT16_MAX),
+ .reason = OFPR_NO_MATCH,
+ .cookie = OVS_BE64_MAX,
+ },
+ .max_len = UINT16_MAX,
+ }
+ };
+ connmgr_send_async_msg(fo->connmgr, &am);
+
+ dp_packet_uninit(&b);