- * Copyright (c) 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
+ * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
check_errno(int a, int b, const char *as, const char *file, int line)
{
if (a != b) {
check_errno(int a, int b, const char *as, const char *file, int line)
{
if (a != b) {
- file, line, as, a, strerror(abs(a)), b, str_b);
+ file, line, as, a, ovs_strerror(abs(a)), b, str_b);
if (!strcmp(type, "tcp")) {
if (error != ECONNRESET && error != EPIPE) {
ovs_fatal(0, "unexpected vconn_connect() return value %d (%s)",
if (!strcmp(type, "tcp")) {
if (error != ECONNRESET && error != EPIPE) {
ovs_fatal(0, "unexpected vconn_connect() return value %d (%s)",
}
} else if (!strcmp(type, "unix")) {
CHECK_ERRNO(error, EPIPE);
} else if (!strcmp(type, "ssl")) {
if (error != EPROTO && error != ECONNRESET) {
ovs_fatal(0, "unexpected vconn_connect() return value %d (%s)",
}
} else if (!strcmp(type, "unix")) {
CHECK_ERRNO(error, EPIPE);
} else if (!strcmp(type, "ssl")) {
if (error != EPROTO && error != ECONNRESET) {
ovs_fatal(0, "unexpected vconn_connect() return value %d (%s)",
if (!strcmp(type, "tcp") || !strcmp(type, "unix")) {
if (error != ECONNRESET && error != EPIPE) {
ovs_fatal(0, "unexpected vconn_connect() return value %d (%s)",
if (!strcmp(type, "tcp") || !strcmp(type, "unix")) {
if (error != ECONNRESET && error != EPIPE) {
ovs_fatal(0, "unexpected vconn_connect() return value %d (%s)",
error = vconn_connect_block(vconn);
if (error != ECONNRESET && error != EPIPE) {
ovs_fatal(0, "unexpected vconn_connect() return value %d (%s)",
error = vconn_connect_block(vconn);
if (error != ECONNRESET && error != EPIPE) {
ovs_fatal(0, "unexpected vconn_connect() return value %d (%s)",
- test_send_hello(type, hello->data, hello->size, 0);
+ test_send_hello(type, ofpbuf_data(hello), ofpbuf_size(hello), 0);
htonl(0x12345678), EXTRA_BYTES);
ofpbuf_put_zeros(hello, EXTRA_BYTES);
ofpmsg_update_length(hello);
htonl(0x12345678), EXTRA_BYTES);
ofpbuf_put_zeros(hello, EXTRA_BYTES);
ofpmsg_update_length(hello);
- test_send_hello(type, hello->data, hello->size, 0);
+ test_send_hello(type, ofpbuf_data(hello), ofpbuf_size(hello), 0);
- test_send_hello(type, echo->data, echo->size, EPROTO);
+ test_send_hello(type, ofpbuf_data(echo), ofpbuf_size(echo), EPROTO);
- ((struct ofp_header *) hello->data)->version = 0;
- test_send_hello(type, hello->data, hello->size, EPROTO);
+ ((struct ofp_header *) ofpbuf_data(hello))->version = 0;
+ test_send_hello(type, ofpbuf_data(hello), ofpbuf_size(hello), EPROTO);
{
set_program_name(argv[0]);
vlog_set_levels(NULL, VLF_ANY_FACILITY, VLL_EMER);
vlog_set_levels(NULL, VLF_CONSOLE, VLL_DBG);
{
set_program_name(argv[0]);
vlog_set_levels(NULL, VLF_ANY_FACILITY, VLL_EMER);
vlog_set_levels(NULL, VLF_CONSOLE, VLL_DBG);