dect
/
libnl
Archived
13
0
Fork 0

dect: fixup example programs for latest library changes

Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
Patrick McHardy 2009-12-17 17:30:24 +01:00
parent d9c446dd4f
commit 17e2ac82ca
11 changed files with 53 additions and 53 deletions

View File

@ -100,28 +100,28 @@ nl_list_sockets_LDADD = -lnl-route
nl_util_addr_SOURCES = nl-util-addr.c
nl_util_addr_LDADD = -lnl-route
dect_transceiver_bind_SOURCES = dect-transceiver-bind.c utils.c
dect_transceiver_bind_SOURCES = dect-transceiver-bind.c
dect_transceiver_bind_LDADD = -lnl-dect
dect_transceiver_list_SOURCES = dect-transceiver-list.c utils.c
dect_transceiver_list_SOURCES = dect-transceiver-list.c
dect_transceiver_list_LDADD = -lnl-dect
dect_cell_add_SOURCES = dect-cell-add.c utils.c
dect_cell_add_SOURCES = dect-cell-add.c
dect_cell_add_LDADD = -lnl-dect
dect_cell_delete_SOURCES = dect-cell-delete.c utils.c
dect_cell_delete_SOURCES = dect-cell-delete.c
dect_cell_delete_LDADD = -lnl-dect
dect_cell_list_SOURCES = dect-cell-list.c utils.c
dect_cell_list_SOURCES = dect-cell-list.c
dect_cell_list_LDADD = -lnl-dect
dect_cluster_add_SOURCES = dect-cluster-add.c utils.c
dect_cluster_add_SOURCES = dect-cluster-add.c
dect_cluster_add_LDADD = -lnl-dect
dect_cluster_delete_SOURCES = dect-cluster-delete.c utils.c
dect_cluster_delete_SOURCES = dect-cluster-delete.c
dect_cluster_delete_LDADD = -lnl-dect
dect_cluster_list_SOURCES = dect-cluster-list.c utils.c
dect_cluster_list_SOURCES = dect-cluster-list.c
dect_cluster_list_LDADD = -lnl-dect
dect_llme_mac_con_SOURCES = dect-llme-mac-con.c utils.c
dect_llme_mac_con_SOURCES = dect-llme-mac-con.c
dect_llme_mac_con_LDADD = -lnl-dect
dect_llme_monitor_SOURCES = dect-llme-monitor.c utils.c
dect_llme_monitor_SOURCES = dect-llme-monitor.c
dect_llme_monitor_LDADD = -lnl-dect
dect_llme_scan_SOURCES = dect-llme-scan.c utils.c
dect_llme_scan_SOURCES = dect-llme-scan.c
dect_llme_scan_LDADD = -lnl-dect

View File

@ -1,4 +1,4 @@
#include "utils.h"
#include "netlink/cli/utils.h"
int main(int argc, char *argv[])
{
@ -12,8 +12,8 @@ int main(int argc, char *argv[])
uint8_t cli;
int err;
sock = nlt_alloc_socket();
nlt_connect(sock, NETLINK_DECT);
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_DECT);
if (nl_dect_cluster_alloc_cache(sock, &cluster_cache))
exit(1);
@ -39,7 +39,7 @@ int main(int argc, char *argv[])
break;
switch (c) {
case 'v': nlt_print_version(); break;
case 'v': nl_cli_print_version(); break;
case ARG_NAME:
nl_dect_cell_set_name(cell, optarg);
break;
@ -58,7 +58,7 @@ int main(int argc, char *argv[])
err = nl_dect_cell_add(sock, cell, 0);
if (err < 0)
fatal(err, "Unable to add cell: %s", nl_geterror(err));
nl_cli_fatal(err, "Unable to add cell: %s", nl_geterror(err));
printf("Added: ");
nl_object_dump(OBJ_CAST(cell), &params);

View File

@ -1,4 +1,4 @@
#include "utils.h"
#include "netlink/cli/utils.h"
int main(int argc, char *argv[])
{
@ -11,8 +11,8 @@ int main(int argc, char *argv[])
};
int err;
sock = nlt_alloc_socket();
nlt_connect(sock, NETLINK_DECT);
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_DECT);
if (nl_dect_cluster_alloc_cache(sock, &cluster_cache))
exit(1);
@ -37,7 +37,7 @@ int main(int argc, char *argv[])
break;
switch (c) {
case 'v': nlt_print_version(); break;
case 'v': nl_cli_print_version(); break;
case ARG_CELL:
nl_dect_cell_set_name(cell, optarg);
break;
@ -50,7 +50,7 @@ int main(int argc, char *argv[])
err = nl_dect_cell_delete(sock, cell, 0);
if (err < 0)
fatal(err, "Unable to delete cell: %s", nl_geterror(err));
nl_cli_fatal(err, "Unable to delete cell: %s", nl_geterror(err));
printf("Deleted: ");
nl_object_dump(OBJ_CAST(cell), &params);

View File

@ -1,4 +1,4 @@
#include "utils.h"
#include "netlink/cli/utils.h"
int main(int argc, char *argv[])
{
@ -10,8 +10,8 @@ int main(int argc, char *argv[])
.dp_fd = stdout,
};
sock = nlt_alloc_socket();
nlt_connect(sock, NETLINK_DECT);
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_DECT);
if (nl_dect_cluster_alloc_cache(sock, &cluster_cache))
exit(1);
nl_cache_mngt_provide(cluster_cache);

View File

@ -1,4 +1,4 @@
#include "utils.h"
#include "netlink/cli/utils.h"
int main(int argc, char *argv[])
{
@ -11,8 +11,8 @@ int main(int argc, char *argv[])
};
int err;
sock = nlt_alloc_socket();
nlt_connect(sock, NETLINK_DECT);
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_DECT);
cl = nl_dect_cluster_alloc();
pari = (void *)nl_dect_cluster_get_pari(cl);
@ -49,7 +49,7 @@ int main(int argc, char *argv[])
break;
switch (c) {
case 'v': nlt_print_version(); break;
case 'v': nl_cli_print_version(); break;
case ARG_NAME:
nl_dect_cluster_set_name(cl, strdup(optarg));
break;
@ -86,7 +86,7 @@ int main(int argc, char *argv[])
nl_dect_cluster_set_pari(cl, pari);
err = nl_dect_cluster_add(sock, cl, 0);
if (err < 0)
fatal(err, "Unable to add cluster: %s", nl_geterror(err));
nl_cli_fatal(err, "Unable to add cluster: %s", nl_geterror(err));
printf("Added: ");
nl_object_dump(OBJ_CAST(cl), &params);

View File

@ -1,4 +1,4 @@
#include "utils.h"
#include "netlink/cli/utils.h"
int main(int argc, char *argv[])
{
@ -11,8 +11,8 @@ int main(int argc, char *argv[])
};
int err;
sock = nlt_alloc_socket();
nlt_connect(sock, NETLINK_DECT);
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_DECT);
cl = nl_dect_cluster_alloc();
pari = (void *)nl_dect_cluster_get_pari(cl);
@ -37,7 +37,7 @@ int main(int argc, char *argv[])
break;
switch (c) {
case 'v': nlt_print_version(); break;
case 'v': nl_cli_print_version(); break;
case ARG_NAME:
nl_dect_cluster_set_name(cl, strdup(optarg));
break;
@ -55,7 +55,7 @@ int main(int argc, char *argv[])
err = nl_dect_cluster_delete(sock, cl, 0);
if (err < 0)
fatal(err, "Unable to delete cluster: %s", nl_geterror(err));
nl_cli_fatal(err, "Unable to delete cluster: %s", nl_geterror(err));
printf("Deleted: ");
nl_object_dump(OBJ_CAST(cl), &params);

View File

@ -1,4 +1,4 @@
#include "utils.h"
#include "netlink/cli/utils.h"
int main(int argc, char *argv[])
{
@ -9,8 +9,8 @@ int main(int argc, char *argv[])
.dp_fd = stdout,
};
sock = nlt_alloc_socket();
nlt_connect(sock, NETLINK_DECT);
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_DECT);
if (nl_dect_cluster_alloc_cache(sock, &cluster_cache))
exit(1);

View File

@ -1,4 +1,4 @@
#include "utils.h"
#include "netlink/cli/utils.h"
static void obj_input(struct nl_object *obj, void *arg)
{
@ -21,8 +21,8 @@ int main(int argc, char *argv[])
struct nl_sock *sock;
struct nl_cache *cluster_cache;
sock = nlt_alloc_socket();
nlt_connect(sock, NETLINK_DECT);
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_DECT);
if (nl_dect_cluster_alloc_cache(sock, &cluster_cache))
exit(1);
nl_cache_mngt_provide(cluster_cache);

View File

@ -1,4 +1,4 @@
#include "utils.h"
#include "netlink/cli/utils.h"
#define CACHE_SIZE 64
@ -79,8 +79,8 @@ int main(int argc, char *argv[])
int index;
int err;
sock = nlt_alloc_socket();
nlt_connect(sock, NETLINK_DECT);
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_DECT);
if (nl_dect_cluster_alloc_cache(sock, &cluster_cache))
exit(1);
nl_cache_mngt_provide(cluster_cache);
@ -109,7 +109,7 @@ int main(int argc, char *argv[])
break;
switch (c) {
case 'v': nlt_print_version(); break;
case 'v': nl_cli_print_version(); break;
case ARG_CLUSTER:
index = nl_dect_cluster_name2i(cluster_cache, optarg);
nl_dect_llme_msg_set_index(lmsg, index);
@ -125,7 +125,7 @@ int main(int argc, char *argv[])
//nl_dect_llme_mac_info_set_pari(lmsg, pari);
if ((err = nl_dect_llme_request(sock, lmsg)) < 0)
fatal(err, "Unable to send request: %s", nl_geterror(err));
nl_cli_fatal(err, "Unable to send request: %s", nl_geterror(err));
printf("Requested: ");
nl_object_dump(OBJ_CAST(lmsg), &params);

View File

@ -1,4 +1,4 @@
#include "utils.h"
#include "netlink/cli/utils.h"
int main(int argc, char *argv[])
{
@ -11,8 +11,8 @@ int main(int argc, char *argv[])
};
int err;
sock = nlt_alloc_socket();
nlt_connect(sock, NETLINK_DECT);
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_DECT);
if (nl_dect_cell_alloc_cache(sock, &cell_cache))
exit(1);
@ -36,7 +36,7 @@ int main(int argc, char *argv[])
break;
switch (c) {
case 'v': nlt_print_version(); break;
case 'v': nl_cli_print_version(); break;
case ARG_TRANSCEIVER:
nl_dect_transceiver_set_name(trx, strdup(optarg));
break;
@ -48,7 +48,7 @@ int main(int argc, char *argv[])
err = nl_dect_transceiver_change(sock, trx, 0);
if (err < 0)
fatal(err, "Unable to bind to cell: %s", nl_geterror(err));
nl_cli_fatal(err, "Unable to bind to cell: %s", nl_geterror(err));
printf("Bound: ");
nl_object_dump(OBJ_CAST(trx), &params);

View File

@ -1,4 +1,4 @@
#include "utils.h"
#include "netlink/cli/utils.h"
int main(int argc, char *argv[])
{
@ -11,8 +11,8 @@ int main(int argc, char *argv[])
.dp_fd = stdout,
};
sock = nlt_alloc_socket();
nlt_connect(sock, NETLINK_DECT);
sock = nl_cli_alloc_socket();
nl_cli_connect(sock, NETLINK_DECT);
if (nl_dect_cell_alloc_cache(sock, &cell_cache))
exit(1);