- uint8_t mac[ETH_ADDR_LEN];
- struct ofpbuf *opi;
- struct ofpbuf b;
-
- /* Compose ofp_packet_in. */
- ofpbuf_init(&b, 128);
- eth_addr_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 ofproto_packet_in pin;
+ struct eth_addr mac;
+ struct dp_packet b;
+
+ dp_packet_init(&b, 128);
+ eth_addr_nicira_random(&mac);
+ compose_rarp(&b, mac);
+
+ memset(&pin, 0, sizeof pin);
+ pin.up.packet = dp_packet_data(&b);
+ pin.up.packet_len = dp_packet_size(&b);
+ pin.up.reason = OFPR_NO_MATCH;
+ match_init_catchall(&pin.up.flow_metadata);
+ match_set_in_port(&pin.up.flow_metadata, OFPP_LOCAL);
+ pin.send_len = dp_packet_size(&b);
+ pin.miss_type = OFPROTO_PACKET_IN_NO_MISS;
+ connmgr_send_packet_in(fo->connmgr, &pin);
+
+ dp_packet_uninit(&b);