if (!(error ? VLOG_DROP_WARN(&error_rl) : VLOG_DROP_DBG(&dpmsg_rl))) {
struct ds ds = DS_EMPTY_INITIALIZER;
- char *packet = ofp_packet_to_string(buf->data, buf->size, buf->size);
+ char *packet = ofp_packet_to_string(buf->data, buf->size);
ds_put_format(&ds, "%s: execute ", dpif_name(dpif));
format_odp_actions(&ds, actions, actions_len);
if (error) {
char *packet;
packet = ofp_packet_to_string(upcall->packet->data,
- upcall->packet->size,
upcall->packet->size);
ds_init(&flow);
/* Returns a string that represents the contents of the Ethernet frame in the
* 'len' bytes starting at 'data' to 'stream' as output by tcpdump.
- * 'total_len' specifies the full length of the Ethernet frame (of which 'len'
- * bytes were captured).
*
* The caller must free the returned string.
*
* This starts and kills a tcpdump subprocess so it's quite expensive. */
char *
-ofp_packet_to_string(const void *data, size_t len, size_t total_len OVS_UNUSED)
+ofp_packet_to_string(const void *data, size_t len)
{
struct ds ds = DS_EMPTY_INITIALIZER;
struct ofpbuf buf;
ds_put_char(string, '\n');
}
if (verbosity > 1) {
- char *packet = ofp_packet_to_string(op->data, data_len,
- ntohs(op->total_len));
+ char *packet = ofp_packet_to_string(op->data, data_len);
ds_put_cstr(string, packet);
free(packet);
}
ds_put_format(string, " data_len=%d", data_len);
if (verbosity > 0 && len > sizeof *opo) {
char *packet = ofp_packet_to_string(
- (uint8_t *)opo->actions + actions_len, data_len, data_len);
+ (uint8_t *) opo->actions + actions_len, data_len);
ds_put_char(string, '\n');
ds_put_cstr(string, packet);
free(packet);
*
* This starts and kills a tcpdump subprocess so it's quite expensive. */
void
-ofp_print_packet(FILE *stream, const void *data, size_t len, size_t total_len)
+ofp_print_packet(FILE *stream, const void *data, size_t len)
{
- print_and_free(stream, ofp_packet_to_string(data, len, total_len));
+ print_and_free(stream, ofp_packet_to_string(data, len));
}
#endif
void ofp_print(FILE *, const void *, size_t, int verbosity);
-void ofp_print_packet(FILE *stream, const void *data, size_t len, size_t total_len);
+void ofp_print_packet(FILE *stream, const void *data, size_t len);
void ofp_print_actions(struct ds *, const union ofp_action *, size_t);
void ofp_print_match(struct ds *, const struct ofp_match *, int verbosity);
char *ofp_to_string(const void *, size_t, int verbosity);
char *ofp_match_to_string(const struct ofp_match *, int verbosity);
-char *ofp_packet_to_string(const void *data, size_t len, size_t total_len);
+char *ofp_packet_to_string(const void *data, size_t len);
char *ofp_message_type_to_string(uint8_t type);
}
ds_put_cstr(&result, "Packet: ");
- s = ofp_packet_to_string(packet->data, packet->size, packet->size);
+ s = ofp_packet_to_string(packet->data, packet->size);
ds_put_cstr(&result, s);
free(s);
errors++;
printf("mismatch on packet #%d (1-based).\n", n);
printf("Packet:\n");
- ofp_print_packet(stdout, packet->data, packet->size, packet->size);
+ ofp_print_packet(stdout, packet->data, packet->size);
ovs_hex_dump(stdout, packet->data, packet->size, 0, true);
cls_rule_print(&rule);
printf("Expected flow:\n%s\n", exp_s);