rename set_link and switch to static. remove internally used structs from header
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>pull/106/head^2
parent
529838a56d
commit
64c23c603c
|
|
@ -14,30 +14,9 @@
|
||||||
#define GET_RESTART_MS 2
|
#define GET_RESTART_MS 2
|
||||||
#define GET_BITTIMING 3
|
#define GET_BITTIMING 3
|
||||||
|
|
||||||
struct get_req {
|
|
||||||
struct nlmsghdr n;
|
|
||||||
struct rtgenmsg g;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct set_req {
|
|
||||||
struct nlmsghdr n;
|
|
||||||
struct ifinfomsg i;
|
|
||||||
char buf[1024];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct req_info {
|
|
||||||
__u8 restart;
|
|
||||||
__u8 disable_autorestart;
|
|
||||||
__u32 restart_ms;
|
|
||||||
__u32 bitrate;
|
|
||||||
__u32 ctrlmode;
|
|
||||||
__u32 flags;
|
|
||||||
};
|
|
||||||
|
|
||||||
int if_down(int fd, const char *name);
|
int if_down(int fd, const char *name);
|
||||||
int if_up(int fd, const char *name);
|
int if_up(int fd, const char *name);
|
||||||
|
|
||||||
int set_link_can(const char *name, struct req_info *req_info);
|
|
||||||
int set_restart(const char *name);
|
int set_restart(const char *name);
|
||||||
int set_bitrate(const char *name, __u32 bitrate);
|
int set_bitrate(const char *name, __u32 bitrate);
|
||||||
int set_restart_ms(const char *name, __u32 restart_ms);
|
int set_restart_ms(const char *name, __u32 restart_ms);
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,25 @@
|
||||||
#define NLMSG_TAIL(nmsg) \
|
#define NLMSG_TAIL(nmsg) \
|
||||||
((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
|
((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
|
||||||
|
|
||||||
|
struct get_req {
|
||||||
|
struct nlmsghdr n;
|
||||||
|
struct rtgenmsg g;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct set_req {
|
||||||
|
struct nlmsghdr n;
|
||||||
|
struct ifinfomsg i;
|
||||||
|
char buf[1024];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct req_info {
|
||||||
|
__u8 restart;
|
||||||
|
__u8 disable_autorestart;
|
||||||
|
__u32 restart_ms;
|
||||||
|
__u32 bitrate;
|
||||||
|
__u32 ctrlmode;
|
||||||
|
__u32 flags;
|
||||||
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
parse_rtattr(struct rtattr **tb, int max, struct rtattr *rta, int len)
|
parse_rtattr(struct rtattr **tb, int max, struct rtattr *rta, int len)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue