Blame src/client/conf-dot3.c
|
Packit |
e9ba0d |
/* -*- mode: c; c-file-style: "openbsd" -*- */
|
|
Packit |
e9ba0d |
/*
|
|
Packit |
e9ba0d |
* Copyright (c) 2013 Vincent Bernat <bernat@luffy.cx>
|
|
Packit |
e9ba0d |
*
|
|
Packit |
e9ba0d |
* Permission to use, copy, modify, and/or distribute this software for any
|
|
Packit |
e9ba0d |
* purpose with or without fee is hereby granted, provided that the above
|
|
Packit |
e9ba0d |
* copyright notice and this permission notice appear in all copies.
|
|
Packit |
e9ba0d |
*
|
|
Packit |
e9ba0d |
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
Packit |
e9ba0d |
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
Packit |
e9ba0d |
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
Packit |
e9ba0d |
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
Packit |
e9ba0d |
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
Packit |
e9ba0d |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
Packit |
e9ba0d |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
Packit |
e9ba0d |
*/
|
|
Packit |
e9ba0d |
|
|
Packit |
e9ba0d |
#include <unistd.h>
|
|
Packit |
e9ba0d |
#include <string.h>
|
|
Packit |
e9ba0d |
|
|
Packit |
e9ba0d |
#include "client.h"
|
|
Packit |
e9ba0d |
#include "../log.h"
|
|
Packit |
e9ba0d |
|
|
Packit |
e9ba0d |
/**
|
|
Packit |
e9ba0d |
* Commands to configure dot3
|
|
Packit |
e9ba0d |
*/
|
|
Packit |
e9ba0d |
void
|
|
Packit |
e9ba0d |
register_commands_configure_dot3(struct cmd_node *configure)
|
|
Packit |
e9ba0d |
{
|
|
Packit |
e9ba0d |
if (lldpctl_key_get_map(
|
|
Packit |
e9ba0d |
lldpctl_k_dot3_power_class)[0].string == NULL)
|
|
Packit |
e9ba0d |
return;
|
|
Packit |
e9ba0d |
|
|
Packit |
e9ba0d |
struct cmd_node *configure_dot3 = commands_new(
|
|
Packit |
e9ba0d |
configure,
|
|
Packit |
e9ba0d |
"dot3", "Dot3 configuration",
|
|
Packit |
e9ba0d |
NULL, NULL, NULL);
|
|
Packit |
e9ba0d |
register_commands_dot3pow(configure_dot3);
|
|
Packit |
e9ba0d |
}
|