Requested by Jean Tourrilhes <jt@hpl.hp.com>.
-/* Copyright (c) 2008, 2009 Nicira Networks, Inc.
+/* Copyright (c) 2008, 2009, 2010 Nicira Networks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
static void
-restore_terminal(void *aux UNUSED)
+restore_terminal(void *aux OVS_UNUSED)
{
endwin();
}
}
static void
-sigusr1_handler(int signr UNUSED)
+sigusr1_handler(int signr OVS_UNUSED)
{
sigusr1_triggered = true;
}
}
static void
-cmd_show_version(const struct dict *dict UNUSED)
+cmd_show_version(const struct dict *dict OVS_UNUSED)
{
show_string(VERSION BUILDNR);
}
}
static void
-cmd_shell(const struct dict *dict UNUSED)
+cmd_shell(const struct dict *dict OVS_UNUSED)
{
const char *home;
}
static void
-cmd_show_motto(const struct dict *dict UNUSED)
+cmd_show_motto(const struct dict *dict OVS_UNUSED)
{
show_string("\"Just Add Ice\"");
}
}
static void
-cmd_configure(const struct dict *dict UNUSED)
+cmd_configure(const struct dict *dict OVS_UNUSED)
{
bool debug_mode = dict_get_bool(dict, "debug", false);
struct dict config_dict;
}
static void
-cmd_set_up_pki(const struct dict *dict UNUSED)
+cmd_set_up_pki(const struct dict *dict OVS_UNUSED)
{
static const char def_privkey_file[]
= "/etc/openflow-switch/of0-privkey.pem";
-/* Copyright (c) 2008, 2009 Nicira Networks, Inc.
+/* Copyright (c) 2008, 2009, 2010 Nicira Networks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
void
-terminal_wait(struct terminal *term UNUSED, int input_fd)
+terminal_wait(struct terminal *term OVS_UNUSED, int input_fd)
{
poll_fd_wait(input_fd, POLLIN);
}
-/* Copyright (c) 2008, 2009 Nicira Networks, Inc.
+/* Copyright (c) 2008, 2009, 2010 Nicira Networks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
int
-tty_set_window_size(int fd UNUSED, int rows UNUSED, int columns UNUSED)
+tty_set_window_size(int fd OVS_UNUSED,
+ int rows OVS_UNUSED,
+ int columns OVS_UNUSED)
{
#ifdef TIOCGWINSZ
struct winsize win;
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#define THIS_MODULE VLM_backtrace
#include "vlog.h"
-static uintptr_t UNUSED
+static uintptr_t OVS_UNUSED
get_max_stack(void)
{
static const char file_name[] = "/proc/self/maps";
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#define COMPILER_H 1
#define NO_RETURN __attribute__((__noreturn__))
-#define UNUSED __attribute__((__unused__))
+#define OVS_UNUSED __attribute__((__unused__))
#define PACKED __attribute__((__packed__))
#define PRINTF_FORMAT(FMT, ARG1) __attribute__((__format__(printf, FMT, ARG1)))
#define STRFTIME_FORMAT(FMT) __attribute__((__format__(__strftime__, FMT, 0)))
/*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
static unsigned int epoch;
static void
-coverage_unixctl_log(struct unixctl_conn *conn, const char *args UNUSED)
+coverage_unixctl_log(struct unixctl_conn *conn, const char *args OVS_UNUSED)
{
coverage_log(VLL_WARN, false);
unixctl_command_reply(conn, 200, NULL);
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
static void
-dhclient_run_RELEASED(struct dhclient *cli UNUSED)
+dhclient_run_RELEASED(struct dhclient *cli OVS_UNUSED)
{
/* Nothing to do. */
}
}
static int
-dpif_linux_open(const char *name UNUSED, char *suffix, bool create,
+dpif_linux_open(const char *name OVS_UNUSED, char *suffix, bool create,
struct dpif **dpifp)
{
int minor;
/*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
static int
-dpif_netdev_open(const char *name UNUSED, char *suffix, bool create,
+dpif_netdev_open(const char *name OVS_UNUSED, char *suffix, bool create,
struct dpif **dpifp)
{
if (create) {
}
static int
-dpif_netdev_port_poll(const struct dpif *dpif_, char **devnamep UNUSED)
+dpif_netdev_port_poll(const struct dpif *dpif_, char **devnamep OVS_UNUSED)
{
struct dpif_netdev *dpif = dpif_netdev_cast(dpif_);
if (dpif->dp_serial != dpif->dp->serial) {
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
static void
-unlink_files(void *aux UNUSED)
+unlink_files(void *aux OVS_UNUSED)
{
do_unlink_files();
}
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#ifndef HAVE_MALLOC_HOOKS
void
-leak_checker_start(const char *file_name UNUSED)
+leak_checker_start(const char *file_name OVS_UNUSED)
{
VLOG_WARN("not enabling leak checker because the libc in use does not "
"have the required hooks");
}
void
-leak_checker_set_limit(off_t max_size UNUSED)
+leak_checker_set_limit(off_t max_size OVS_UNUSED)
{
}
void
-leak_checker_claim(const void *p UNUSED)
+leak_checker_claim(const void *p OVS_UNUSED)
{
}
}
static void *
-hook_malloc(size_t size, const void *caller UNUSED)
+hook_malloc(size_t size, const void *caller OVS_UNUSED)
{
void *p;
}
static void
-hook_free(void *p, const void *caller UNUSED)
+hook_free(void *p, const void *caller OVS_UNUSED)
{
if (!p) {
return;
}
static void *
-hook_realloc(void *p, size_t size, const void *caller UNUSED)
+hook_realloc(void *p, size_t size, const void *caller OVS_UNUSED)
{
void *q;
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
static void
-process_phy_port(struct lswitch *sw, struct rconn *rconn UNUSED, void *opp_)
+process_phy_port(struct lswitch *sw, struct rconn *rconn OVS_UNUSED,
+ void *opp_)
{
const struct ofp_phy_port *opp = opp_;
uint16_t port_no = ntohs(opp->port_no);
/*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
static void
netdev_linux_cache_cb(const struct rtnetlink_change *change,
- void *aux UNUSED)
+ void *aux OVS_UNUSED)
{
struct netdev_linux_cache *cache;
if (change) {
/* Adds 'router' as a default IP gateway. */
static int
-netdev_linux_add_router(struct netdev *netdev UNUSED, struct in_addr router)
+netdev_linux_add_router(struct netdev *netdev OVS_UNUSED, struct in_addr router)
{
struct in_addr any = { INADDR_ANY };
struct rtentry rt;
static void
netdev_linux_poll_cb(const struct rtnetlink_change *change,
- void *aux UNUSED)
+ void *aux OVS_UNUSED)
{
if (change) {
struct list *list = shash_find_data(&netdev_linux_notifiers,
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/* Retores all the flags on all network devices that we modified. Called from
* a signal handler, so it does not attempt to report error conditions. */
static void
-restore_all_flags(void *aux UNUSED)
+restore_all_flags(void *aux OVS_UNUSED)
{
struct netdev *netdev;
LIST_FOR_EACH (netdev, struct netdev, node, &netdev_list) {
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* 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 UNUSED)
+ofp_packet_to_string(const void *data, size_t len, size_t total_len OVS_UNUSED)
{
struct ds ds = DS_EMPTY_INITIALIZER;
struct ofpbuf buf;
* 'string' at the given 'verbosity' level. */
static void
ofp_print_switch_features(struct ds *string, const void *oh, size_t len,
- int verbosity UNUSED)
+ int verbosity OVS_UNUSED)
{
const struct ofp_switch_features *osf = oh;
struct ofp_phy_port *port_list;
/* Pretty-print the struct ofp_switch_config of 'len' bytes at 'oh' to 'string'
* at the given 'verbosity' level. */
static void
-ofp_print_switch_config(struct ds *string, const void *oh, size_t len UNUSED,
- int verbosity UNUSED)
+ofp_print_switch_config(struct ds *string, const void *oh,
+ size_t len OVS_UNUSED, int verbosity OVS_UNUSED)
{
const struct ofp_switch_config *osc = oh;
uint16_t flags;
/* Pretty-print the OFPT_FLOW_EXPIRED packet of 'len' bytes at 'oh' to 'string'
* at the given 'verbosity' level. */
static void
-ofp_print_flow_expired(struct ds *string, const void *oh, size_t len UNUSED,
- int verbosity)
+ofp_print_flow_expired(struct ds *string, const void *oh,
+ size_t len OVS_UNUSED, int verbosity)
{
const struct ofp_flow_expired *ofe = oh;
}
static void
-ofp_print_port_mod(struct ds *string, const void *oh, size_t len UNUSED,
- int verbosity UNUSED)
+ofp_print_port_mod(struct ds *string, const void *oh, size_t len OVS_UNUSED,
+ int verbosity OVS_UNUSED)
{
const struct ofp_port_mod *opm = oh;
* at the given 'verbosity' level. */
static void
ofp_print_error_msg(struct ds *string, const void *oh, size_t len,
- int verbosity UNUSED)
+ int verbosity OVS_UNUSED)
{
const struct ofp_error_msg *oem = oh;
int type = ntohs(oem->type);
/* Pretty-print the OFPT_PORT_STATUS packet of 'len' bytes at 'oh' to 'string'
* at the given 'verbosity' level. */
static void
-ofp_print_port_status(struct ds *string, const void *oh, size_t len UNUSED,
- int verbosity UNUSED)
+ofp_print_port_status(struct ds *string, const void *oh, size_t len OVS_UNUSED,
+ int verbosity OVS_UNUSED)
{
const struct ofp_port_status *ops = oh;
}
static void
-ofp_desc_stats_reply(struct ds *string, const void *body, size_t len UNUSED,
- int verbosity UNUSED)
+ofp_desc_stats_reply(struct ds *string, const void *body,
+ size_t len OVS_UNUSED, int verbosity OVS_UNUSED)
{
const struct ofp_desc_stats *ods = body;
}
static void
-ofp_flow_stats_request(struct ds *string, const void *oh, size_t len UNUSED,
- int verbosity)
+ofp_flow_stats_request(struct ds *string, const void *oh,
+ size_t len OVS_UNUSED, int verbosity)
{
const struct ofp_flow_stats_request *fsr = oh;
static void
ofp_aggregate_stats_request(struct ds *string, const void *oh,
- size_t len UNUSED, int verbosity)
+ size_t len OVS_UNUSED, int verbosity)
{
const struct ofp_aggregate_stats_request *asr = oh;
static void
ofp_aggregate_stats_reply(struct ds *string, const void *body_,
- size_t len UNUSED, int verbosity UNUSED)
+ size_t len OVS_UNUSED, int verbosity OVS_UNUSED)
{
const struct ofp_aggregate_stats_reply *asr = body_;
static void
vendor_stat(struct ds *string, const void *body, size_t len,
- int verbosity UNUSED)
+ int verbosity OVS_UNUSED)
{
ds_put_format(string, " vendor=%08"PRIx32, ntohl(*(uint32_t *) body));
ds_put_format(string, " %zu bytes additional data",
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#define ETH_ADDR_LEN 6
-static const uint8_t eth_addr_broadcast[ETH_ADDR_LEN] UNUSED
+static const uint8_t eth_addr_broadcast[ETH_ADDR_LEN] OVS_UNUSED
= { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
static inline bool eth_addr_is_broadcast(const uint8_t ea[6])
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
static bool sigchld_is_blocked(void);
static void block_sigchld(sigset_t *);
static void unblock_sigchld(const sigset_t *);
-static void sigchld_handler(int signr UNUSED);
+static void sigchld_handler(int signr OVS_UNUSED);
static bool is_member(int x, const int *array, size_t);
/* Initializes the process subsystem (if it is not already initialized). Calls
}
\f
static void
-sigchld_handler(int signr UNUSED)
+sigchld_handler(int signr OVS_UNUSED)
{
struct process *p;
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/* Checks the internal integrity of 'q'. For use in debugging. */
static void
-check_queue(struct ovs_queue *q UNUSED)
+check_queue(struct ovs_queue *q OVS_UNUSED)
{
#if 0
struct ofpbuf *iter;
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
static unsigned int
-timeout_VOID(const struct rconn *rc UNUSED)
+timeout_VOID(const struct rconn *rc OVS_UNUSED)
{
return UINT_MAX;
}
static void
-run_VOID(struct rconn *rc UNUSED)
+run_VOID(struct rconn *rc OVS_UNUSED)
{
/* Nothing to do. */
}
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Returns the socket's fd if successful, otherwise a negative errno value. */
int
-make_unix_socket(int style, bool nonblock, bool passcred UNUSED,
+make_unix_socket(int style, bool nonblock, bool passcred OVS_UNUSED,
const char *bind_path, const char *connect_path)
{
int error;
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
static struct shash commands = SHASH_INITIALIZER(&commands);
static void
-unixctl_help(struct unixctl_conn *conn, const char *args UNUSED)
+unixctl_help(struct unixctl_conn *conn, const char *args OVS_UNUSED)
{
struct ds ds = DS_EMPTY_INITIALIZER;
struct shash_node *node;
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
static int interpret_ssl_error(const char *function, int ret, int error,
int *want);
static void ssl_tx_poll_callback(int fd, short int revents, void *vconn_);
-static DH *tmp_dh_callback(SSL *ssl, int is_export UNUSED, int keylength);
+static DH *tmp_dh_callback(SSL *ssl, int is_export OVS_UNUSED, int keylength);
static void log_ca_cert(const char *file_name, X509 *cert);
static short int
}
static void
-ssl_tx_poll_callback(int fd UNUSED, short int revents UNUSED, void *vconn_)
+ssl_tx_poll_callback(int fd OVS_UNUSED, short int revents OVS_UNUSED,
+ void *vconn_)
{
struct vconn *vconn = vconn_;
struct ssl_vconn *sslv = ssl_vconn_cast(vconn);
}
static DH *
-tmp_dh_callback(SSL *ssl UNUSED, int is_export UNUSED, int keylength)
+tmp_dh_callback(SSL *ssl OVS_UNUSED, int is_export OVS_UNUSED, int keylength)
{
struct dh {
int keylength;
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
static void
-stream_do_tx(int fd UNUSED, short int revents UNUSED, void *vconn_)
+stream_do_tx(int fd OVS_UNUSED, short int revents OVS_UNUSED, void *vconn_)
{
struct vconn *vconn = vconn_;
struct stream_vconn *s = stream_vconn_cast(vconn);
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
struct vconn **vconnp);
static int
-ptcp_open(const char *name UNUSED, char *suffix, struct pvconn **pvconnp)
+ptcp_open(const char *name OVS_UNUSED, char *suffix, struct pvconn **pvconnp)
{
int fd;
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
struct vconn **vconnp);
static int
-punix_open(const char *name UNUSED, char *suffix, struct pvconn **pvconnp)
+punix_open(const char *name OVS_UNUSED, char *suffix, struct pvconn **pvconnp)
{
int fd, error;
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* connection methods supported by the vconn. If 'bootstrap' is true, also
* advertises options to bootstrap the CA certificate. */
void
-vconn_usage(bool active, bool passive, bool bootstrap UNUSED)
+vconn_usage(bool active, bool passive, bool bootstrap OVS_UNUSED)
{
/* Really this should be implemented via callbacks into the vconn
* providers, but that seems too heavy-weight to bother with at the
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
static void
-vlog_unixctl_list(struct unixctl_conn *conn, const char *args UNUSED)
+vlog_unixctl_list(struct unixctl_conn *conn, const char *args OVS_UNUSED)
{
char *msg = vlog_get_levels();
unixctl_command_reply(conn, 200, msg);
}
static void
-vlog_unixctl_reopen(struct unixctl_conn *conn, const char *args UNUSED)
+vlog_unixctl_reopen(struct unixctl_conn *conn, const char *args OVS_UNUSED)
{
if (log_file_name) {
int error = vlog_reopen_log_file();
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
static void
-modify_dhcp_request(struct dhcp_msg *msg, void *aux UNUSED)
+modify_dhcp_request(struct dhcp_msg *msg, void *aux OVS_UNUSED)
{
dhcp_msg_put_string(msg, DHCP_CODE_VENDOR_CLASS, "OpenFlow");
}
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
static void
-sigchld_handler(int signr UNUSED)
+sigchld_handler(int signr OVS_UNUSED)
{
write(signal_fds[1], "", 1);
}
/* sFlow library callback to allocate memory. */
static void *
-sflow_agent_alloc_cb(void *magic UNUSED, SFLAgent *agent UNUSED, size_t bytes)
+sflow_agent_alloc_cb(void *magic OVS_UNUSED, SFLAgent *agent OVS_UNUSED,
+ size_t bytes)
{
return calloc(1, bytes);
}
/* sFlow library callback to free memory. */
static int
-sflow_agent_free_cb(void *magic UNUSED, SFLAgent *agent UNUSED, void *obj)
+sflow_agent_free_cb(void *magic OVS_UNUSED, SFLAgent *agent OVS_UNUSED,
+ void *obj)
{
free(obj);
return 0;
/* sFlow library callback to report error. */
static void
-sflow_agent_error_cb(void *magic UNUSED, SFLAgent *agent UNUSED, char *msg)
+sflow_agent_error_cb(void *magic OVS_UNUSED, SFLAgent *agent OVS_UNUSED,
+ char *msg)
{
VLOG_WARN("sFlow agent error: %s", msg);
}
/* sFlow library callback to send datagram. */
static void
-sflow_agent_send_packet_cb(void *os_, SFLAgent *agent UNUSED,
- SFLReceiver *receiver UNUSED, u_char *pkt,
+sflow_agent_send_packet_cb(void *os_, SFLAgent *agent OVS_UNUSED,
+ SFLReceiver *receiver OVS_UNUSED, u_char *pkt,
uint32_t pktLen)
{
struct ofproto_sflow *os = os_;
/*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
int
-ofproto_set_stp(struct ofproto *ofproto UNUSED, bool enable_stp)
+ofproto_set_stp(struct ofproto *ofproto OVS_UNUSED, bool enable_stp)
{
/* XXX */
if (enable_stp) {
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
static void
-modify_dhcp_request(struct dhcp_msg *msg, void *aux UNUSED)
+modify_dhcp_request(struct dhcp_msg *msg, void *aux OVS_UNUSED)
{
if (vendor_class) {
dhcp_msg_put_string(msg, DHCP_CODE_VENDOR_CLASS, vendor_class);
/*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <assert.h>
int
-main(int argc UNUSED, char *argv[])
+main(int argc OVS_UNUSED, char *argv[])
{
struct ofp_match expected_match;
FILE *flows, *pcap;
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
static size_t
-constant_hash(int value UNUSED)
+constant_hash(int value OVS_UNUSED)
{
return 123;
}
/*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
int
-main(int argc UNUSED, char *argv[])
+main(int argc OVS_UNUSED, char *argv[])
{
set_program_name(argv[0]);
time_init();
/*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
};
int
-main(int argc UNUSED, char *argv[])
+main(int argc OVS_UNUSED, char *argv[])
{
struct nl_sock *sock;
int error;
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
static bool exit_after_bind;
static bool iface_init(struct iface *, const char *netdev_name);
-static void release_ifaces(void *aux UNUSED);
+static void release_ifaces(void *aux OVS_UNUSED);
static void parse_options(int argc, char *argv[]);
static void usage(void) NO_RETURN;
}
static void
-release_ifaces(void *aux UNUSED)
+release_ifaces(void *aux OVS_UNUSED)
{
int i;
}
static void
-modify_dhcp_request(struct dhcp_msg *msg, void *aux UNUSED)
+modify_dhcp_request(struct dhcp_msg *msg, void *aux OVS_UNUSED)
{
dhcp_msg_put_string(msg, DHCP_CODE_VENDOR_CLASS, "OpenFlow");
}
static bool
-validate_dhcp_offer(const struct dhcp_msg *msg, void *aux UNUSED)
+validate_dhcp_offer(const struct dhcp_msg *msg, void *aux OVS_UNUSED)
{
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(60, 60);
char *vconn_name;
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
static void
-do_add_dp(int argc UNUSED, char *argv[])
+do_add_dp(int argc OVS_UNUSED, char *argv[])
{
struct dpif *dpif;
run(dpif_create(argv[1], &dpif), "add_dp");
}
static void
-do_del_dp(int argc UNUSED, char *argv[])
+do_del_dp(int argc OVS_UNUSED, char *argv[])
{
struct dpif *dpif;
run(dpif_open(argv[1], &dpif), "opening datapath");
}
static void
-do_add_if(int argc UNUSED, char *argv[])
+do_add_if(int argc OVS_UNUSED, char *argv[])
{
bool failure = false;
struct dpif *dpif;
}
static void
-do_del_if(int argc UNUSED, char *argv[])
+do_del_if(int argc OVS_UNUSED, char *argv[])
{
bool failure = false;
struct dpif *dpif;
}
static void
-do_dump_dps(int argc UNUSED, char *argv[] UNUSED)
+do_dump_dps(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
struct svec all_dps;
unsigned int i;
}
static void
-do_dump_flows(int argc UNUSED, char *argv[])
+do_dump_flows(int argc OVS_UNUSED, char *argv[])
{
struct odp_flow *flows;
struct dpif *dpif;
}
static void
-do_del_flows(int argc UNUSED, char *argv[])
+do_del_flows(int argc OVS_UNUSED, char *argv[])
{
struct dpif *dpif;
}
static void
-do_dump_groups(int argc UNUSED, char *argv[])
+do_dump_groups(int argc OVS_UNUSED, char *argv[])
{
struct odp_stats stats;
struct dpif *dpif;
}
static void
-do_help(int argc UNUSED, char *argv[] UNUSED)
+do_help(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
usage();
}
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
static void
-do_show(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_show(const struct settings *s OVS_UNUSED, int argc OVS_UNUSED, char *argv[])
{
dump_trivial_transaction(argv[1], OFPT_FEATURES_REQUEST);
dump_trivial_transaction(argv[1], OFPT_GET_CONFIG_REQUEST);
}
static void
-do_status(const struct settings *s UNUSED, int argc, char *argv[])
+do_status(const struct settings *s OVS_UNUSED, int argc, char *argv[])
{
struct nicira_header *request, *reply;
struct vconn *vconn;
}
static void
-do_dump_desc(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_dump_desc(const struct settings *s OVS_UNUSED,
+ int argc OVS_UNUSED, char *argv[])
{
dump_trivial_stats_transaction(argv[1], OFPST_DESC);
}
static void
-do_dump_tables(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_dump_tables(const struct settings *s OVS_UNUSED,
+ int argc OVS_UNUSED, char *argv[])
{
dump_trivial_stats_transaction(argv[1], OFPST_TABLE);
}
}
static void
-do_dump_flows(const struct settings *s UNUSED, int argc, char *argv[])
+do_dump_flows(const struct settings *s OVS_UNUSED, int argc, char *argv[])
{
struct ofp_flow_stats_request *req;
uint16_t out_port;
}
static void
-do_dump_aggregate(const struct settings *s UNUSED, int argc, char *argv[])
+do_dump_aggregate(const struct settings *s OVS_UNUSED, int argc, char *argv[])
{
struct ofp_aggregate_stats_request *req;
struct ofpbuf *request;
}
static void
-do_add_flow(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_add_flow(const struct settings *s OVS_UNUSED, int argc OVS_UNUSED,
+ char *argv[])
{
struct vconn *vconn;
struct ofpbuf *buffer;
}
static void
-do_add_flows(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_add_flows(const struct settings *s OVS_UNUSED, int argc OVS_UNUSED,
+ char *argv[])
{
struct vconn *vconn;
FILE *file;
}
static void
-do_mod_flows(const struct settings *s, int argc UNUSED, char *argv[])
+do_mod_flows(const struct settings *s, int argc OVS_UNUSED, char *argv[])
{
uint16_t priority, idle_timeout, hard_timeout;
struct vconn *vconn;
}
static void
-do_monitor(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_monitor(const struct settings *s OVS_UNUSED,
+ int argc OVS_UNUSED, char *argv[])
{
struct vconn *vconn;
}
static void
-do_dump_ports(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_dump_ports(const struct settings *s OVS_UNUSED,
+ int argc OVS_UNUSED, char *argv[])
{
dump_trivial_stats_transaction(argv[1], OFPST_PORT);
}
static void
-do_probe(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_probe(const struct settings *s OVS_UNUSED,
+ int argc OVS_UNUSED, char *argv[])
{
struct ofpbuf *request;
struct vconn *vconn;
}
static void
-do_mod_port(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_mod_port(const struct settings *s OVS_UNUSED,
+ int argc OVS_UNUSED, char *argv[])
{
struct ofpbuf *request, *reply;
struct ofp_switch_features *osf;
}
static void
-do_ping(const struct settings *s UNUSED, int argc, char *argv[])
+do_ping(const struct settings *s OVS_UNUSED, int argc, char *argv[])
{
size_t max_payload = 65535 - sizeof(struct ofp_header);
unsigned int payload;
}
static void
-do_benchmark(const struct settings *s UNUSED, int argc UNUSED, char *argv[])
+do_benchmark(const struct settings *s OVS_UNUSED,
+ int argc OVS_UNUSED, char *argv[])
{
size_t max_payload = 65535 - sizeof(struct ofp_header);
struct timeval start, end;
}
static void
-do_execute(const struct settings *s UNUSED, int argc, char *argv[])
+do_execute(const struct settings *s OVS_UNUSED, int argc, char *argv[])
{
struct vconn *vconn;
struct ofpbuf *request;
}
static void
-do_help(const struct settings *s UNUSED, int argc UNUSED, char *argv[] UNUSED)
+do_help(const struct settings *s OVS_UNUSED,
+ int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
usage();
}
-/* Copyright (c) 2008, 2009 Nicira Networks
+/* Copyright (c) 2008, 2009, 2010 Nicira Networks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* for 'iface', if it is not already open, and retrieves the interface's MAC
* address and carrier status. */
static bool
-init_iface_netdev(struct bridge *br UNUSED, struct iface *iface,
- void *aux UNUSED)
+init_iface_netdev(struct bridge *br OVS_UNUSED, struct iface *iface,
+ void *aux OVS_UNUSED)
{
if (iface->netdev) {
return true;
}
static bool
-check_iface_dp_ifidx(struct bridge *br, struct iface *iface, void *aux UNUSED)
+check_iface_dp_ifidx(struct bridge *br, struct iface *iface,
+ void *aux OVS_UNUSED)
{
if (iface->dp_ifidx >= 0) {
VLOG_DBG("%s has interface %s on port %d",
}
static bool
-set_iface_properties(struct bridge *br UNUSED, struct iface *iface,
- void *aux UNUSED)
+set_iface_properties(struct bridge *br OVS_UNUSED, struct iface *iface,
+ void *aux OVS_UNUSED)
{
int rate, burst;
return dst - dsts;
}
-static void UNUSED
+static void OVS_UNUSED
print_dsts(const struct dst *dsts, size_t n)
{
for (; n--; dsts++) {
/* Bonding unixctl user interface functions. */
static void
-bond_unixctl_list(struct unixctl_conn *conn, const char *args UNUSED)
+bond_unixctl_list(struct unixctl_conn *conn, const char *args OVS_UNUSED)
{
struct ds ds = DS_EMPTY_INITIALIZER;
const struct bridge *br;
-/* Copyright (c) 2009 Nicira Networks
+/* Copyright (c) 2009, 2010 Nicira Networks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
static int
-recv_echo_request(uint32_t xid UNUSED, const void *msg)
+recv_echo_request(uint32_t xid OVS_UNUSED, const void *msg)
{
const struct ofp_header *rq = msg;
send_openflow_buffer(make_echo_reply(rq));
}
static int
-recv_features_request(uint32_t xid, const void *msg UNUSED)
+recv_features_request(uint32_t xid, const void *msg OVS_UNUSED)
{
send_features_reply(xid);
return 0;
}
static int
-recv_set_config(uint32_t xid UNUSED, const void *msg UNUSED)
+recv_set_config(uint32_t xid OVS_UNUSED, const void *msg OVS_UNUSED)
{
/* Nothing to configure! */
return 0;
}
static int
-recv_ofmp_resources_request(uint32_t xid, const void *msg UNUSED,
- size_t len UNUSED)
+recv_ofmp_resources_request(uint32_t xid, const void *msg OVS_UNUSED,
+ size_t len OVS_UNUSED)
{
send_resources_update(xid, true);
return 0;
-/* Copyright (c) 2008, 2009 Nicira Networks
+/* Copyright (c) 2008, 2009, 2010 Nicira Networks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
static void
-reload(struct unixctl_conn *conn, const char *args UNUSED)
+reload(struct unixctl_conn *conn, const char *args OVS_UNUSED)
{
need_reconfigure = true;
conns = xrealloc(conns, sizeof *conns * (n_conns + 1));