&dpif_linux_class,
#endif
&dpif_netdev_class,
+ &dpif_planetlab_class,
};
struct registered_dpif_class {
long long int used, struct dpif_flow_stats *stats)
{
stats->tcp_flags = ntohs(flow->tcp_flags);
- stats->n_bytes = packet->size;
+ stats->n_bytes = ofpbuf_size(packet);
stats->n_packets = 1;
stats->used = used;
}
size_t actions_len;
if (!error && actionsp) {
- actions = (*actionsp)->data;
- actions_len = (*actionsp)->size;
+ actions = ofpbuf_data(*actionsp);
+ actions_len = ofpbuf_size(*actionsp);
} else {
actions = NULL;
actions_len = 0;
struct ds flow;
char *packet;
- packet = ofp_packet_to_string(upcall->packet.data,
- upcall->packet.size);
+ packet = ofp_packet_to_string(ofpbuf_data(&upcall->packet),
+ ofpbuf_size(&upcall->packet));
ds_init(&flow);
odp_flow_key_format(upcall->key, upcall->key_len, &flow);
struct ds ds = DS_EMPTY_INITIALIZER;
char *packet;
- packet = ofp_packet_to_string(execute->packet->data,
- execute->packet->size);
+ packet = ofp_packet_to_string(ofpbuf_data(execute->packet),
+ ofpbuf_size(execute->packet));
ds_put_format(&ds, "%s: execute ", dpif_name(dpif));
format_odp_actions(&ds, execute->actions, execute->actions_len);
if (error) {