#include "lldpd.h"
#include "trace.h"
-static int
+static ssize_t
client_handle_none(struct lldpd *cfg, enum hmsg_type *type,
void *input, int input_len, void **output, int *subscribed)
{
}
/* Return the global configuration */
-static int
+static ssize_t
client_handle_get_configuration(struct lldpd *cfg, enum hmsg_type *type,
void *input, int input_len, void **output, int *subscribed)
{
}
/* Change the global configuration */
-static int
+static ssize_t
client_handle_set_configuration(struct lldpd *cfg, enum hmsg_type *type,
void *input, int input_len, void **output, int *subscribed)
{
Input: nothing.
Output: list of interface names (lldpd_interface_list)
*/
-static int
+static ssize_t
client_handle_get_interfaces(struct lldpd *cfg, enum hmsg_type *type,
void *input, int input_len, void **output, int *subscribed)
{
struct lldpd_interface *iff, *iff_next;
struct lldpd_hardware *hardware;
- int output_len;
+ ssize_t output_len;
/* Build the list of interfaces */
struct lldpd_interface_list ifs;
Input: name of the interface (serialized)
Output: Information about the interface (lldpd_hardware)
*/
-static int
+static ssize_t
client_handle_get_interface(struct lldpd *cfg, enum hmsg_type *type,
void *input, int input_len, void **output, int *subscribed)
{
log_debug("rpc", "client request interface %s", name);
TAILQ_FOREACH(hardware, &cfg->g_hardware, h_entries)
if (!strcmp(hardware->h_ifname, name)) {
- int output_len = lldpd_hardware_serialize(hardware, output);
+ ssize_t output_len = lldpd_hardware_serialize(hardware, output);
free(name);
if (output_len <= 0) {
*type = NONE;
Input: name of the interface, policy/location/power setting to be modified
Output: nothing
*/
-static int
+static ssize_t
client_handle_set_port(struct lldpd *cfg, enum hmsg_type *type,
void *input, int input_len, void **output, int *subscribed)
{
}
/* Register subscribtion to neighbor changes */
-static int
+static ssize_t
client_handle_subscribe(struct lldpd *cfg, enum hmsg_type *type,
void *input, int input_len, void **output, int *subscribed)
{
struct client_handle {
enum hmsg_type type;
const char *name;
- int (*handle)(struct lldpd*, enum hmsg_type *,
+ ssize_t (*handle)(struct lldpd*, enum hmsg_type *,
void *, int, void **, int *);
};
int *subscribed)
{
struct client_handle *ch;
- void *answer; size_t len, sent;
+ void *answer; ssize_t len, sent;
log_debug("rpc", "handle client request");
for (ch = client_handles; ch->handle != NULL; ch++) {