mirror of
https://github.com/outbackdingo/udevmand.git
synced 2026-08-25 14:53:42 +00:00
resolv port to owrt iface names
Signed-off-by: John Crispin <[email protected]>
This commit is contained in:
@@ -136,7 +136,7 @@ iface_dump(void)
|
|||||||
struct iface_ip *ip;
|
struct iface_ip *ip;
|
||||||
void *c, *d;
|
void *c, *d;
|
||||||
|
|
||||||
c = blobmsg_open_table(&b, iface->name);
|
c = blobmsg_open_table(&b, interface_resolve(iface->name));
|
||||||
blobmsg_add_mac(&b, "hwaddr", iface->addr);
|
blobmsg_add_mac(&b, "hwaddr", iface->addr);
|
||||||
if (!list_empty(&iface->ipv4)) {
|
if (!list_empty(&iface->ipv4)) {
|
||||||
d = blobmsg_open_array(&b, "ipv4");
|
d = blobmsg_open_array(&b, "ipv4");
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ ubus_mac_cb(struct ubus_context *ctx, struct ubus_object *obj,
|
|||||||
return UBUS_STATUS_OK;
|
return UBUS_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
/*static int
|
||||||
ubus_interface_cb(struct ubus_context *ctx, struct ubus_object *obj,
|
ubus_interface_cb(struct ubus_context *ctx, struct ubus_object *obj,
|
||||||
struct ubus_request_data *req, const char *method,
|
struct ubus_request_data *req, const char *method,
|
||||||
struct blob_attr *msg)
|
struct blob_attr *msg)
|
||||||
@@ -60,7 +60,7 @@ ubus_interface_cb(struct ubus_context *ctx, struct ubus_object *obj,
|
|||||||
if (!interface_dump())
|
if (!interface_dump())
|
||||||
ubus_send_reply(ctx, req, b.head);
|
ubus_send_reply(ctx, req, b.head);
|
||||||
return UBUS_STATUS_OK;
|
return UBUS_STATUS_OK;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ubus_port_cb(struct ubus_context *ctx, struct ubus_object *obj,
|
ubus_port_cb(struct ubus_context *ctx, struct ubus_object *obj,
|
||||||
@@ -74,7 +74,7 @@ ubus_port_cb(struct ubus_context *ctx, struct ubus_object *obj,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct ubus_method topology_methods[] = {
|
static const struct ubus_method topology_methods[] = {
|
||||||
UBUS_METHOD_NOARG("interface", ubus_interface_cb),
|
//UBUS_METHOD_NOARG("interface", ubus_interface_cb),
|
||||||
UBUS_METHOD_NOARG("mac", ubus_mac_cb),
|
UBUS_METHOD_NOARG("mac", ubus_mac_cb),
|
||||||
UBUS_METHOD_NOARG("port", ubus_port_cb),
|
UBUS_METHOD_NOARG("port", ubus_port_cb),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user