mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 09:08:18 +02:00
platform/netlink: add const modifier for genl functions
This commit is contained in:
parent
59f577df56
commit
1460adc918
2 changed files with 22 additions and 22 deletions
|
|
@ -761,8 +761,8 @@ genlmsg_user_hdr(const struct genlmsghdr *gnlh)
|
|||
return genlmsg_data(gnlh);
|
||||
}
|
||||
|
||||
struct genlmsghdr *
|
||||
genlmsg_hdr(struct nlmsghdr *nlh)
|
||||
const struct genlmsghdr *
|
||||
genlmsg_hdr(const struct nlmsghdr *nlh)
|
||||
{
|
||||
return nlmsg_data(nlh);
|
||||
}
|
||||
|
|
@ -795,7 +795,7 @@ genlmsg_attrlen(const struct genlmsghdr *gnlh, int hdrlen)
|
|||
}
|
||||
|
||||
int
|
||||
genlmsg_valid_hdr(struct nlmsghdr *nlh, int hdrlen)
|
||||
genlmsg_valid_hdr(const struct nlmsghdr *nlh, int hdrlen)
|
||||
{
|
||||
struct genlmsghdr *ghdr;
|
||||
|
||||
|
|
@ -810,13 +810,13 @@ genlmsg_valid_hdr(struct nlmsghdr *nlh, int hdrlen)
|
|||
}
|
||||
|
||||
int
|
||||
genlmsg_parse(struct nlmsghdr *nlh,
|
||||
genlmsg_parse(const struct nlmsghdr *nlh,
|
||||
int hdrlen,
|
||||
struct nlattr *tb[],
|
||||
int maxtype,
|
||||
const struct nla_policy *policy)
|
||||
{
|
||||
struct genlmsghdr *ghdr;
|
||||
const struct genlmsghdr *ghdr;
|
||||
|
||||
if (!genlmsg_valid_hdr(nlh, hdrlen))
|
||||
return -NME_NL_MSG_TOOSHORT;
|
||||
|
|
|
|||
|
|
@ -573,24 +573,24 @@ int nl_socket_set_ext_ack(struct nl_sock *sk, gboolean enable);
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
void *genlmsg_put(struct nl_msg *msg,
|
||||
uint32_t port,
|
||||
uint32_t seq,
|
||||
int family,
|
||||
int hdrlen,
|
||||
int flags,
|
||||
uint8_t cmd,
|
||||
uint8_t version);
|
||||
void *genlmsg_data(const struct genlmsghdr *gnlh);
|
||||
void *genlmsg_user_hdr(const struct genlmsghdr *gnlh);
|
||||
struct genlmsghdr *genlmsg_hdr(struct nlmsghdr *nlh);
|
||||
void *genlmsg_user_data(const struct genlmsghdr *gnlh, const int hdrlen);
|
||||
struct nlattr *genlmsg_attrdata(const struct genlmsghdr *gnlh, int hdrlen);
|
||||
int genlmsg_len(const struct genlmsghdr *gnlh);
|
||||
int genlmsg_attrlen(const struct genlmsghdr *gnlh, int hdrlen);
|
||||
int genlmsg_valid_hdr(struct nlmsghdr *nlh, int hdrlen);
|
||||
void *genlmsg_put(struct nl_msg *msg,
|
||||
uint32_t port,
|
||||
uint32_t seq,
|
||||
int family,
|
||||
int hdrlen,
|
||||
int flags,
|
||||
uint8_t cmd,
|
||||
uint8_t version);
|
||||
void *genlmsg_data(const struct genlmsghdr *gnlh);
|
||||
void *genlmsg_user_hdr(const struct genlmsghdr *gnlh);
|
||||
const struct genlmsghdr *genlmsg_hdr(const struct nlmsghdr *nlh);
|
||||
void *genlmsg_user_data(const struct genlmsghdr *gnlh, const int hdrlen);
|
||||
struct nlattr *genlmsg_attrdata(const struct genlmsghdr *gnlh, int hdrlen);
|
||||
int genlmsg_len(const struct genlmsghdr *gnlh);
|
||||
int genlmsg_attrlen(const struct genlmsghdr *gnlh, int hdrlen);
|
||||
int genlmsg_valid_hdr(const struct nlmsghdr *nlh, int hdrlen);
|
||||
|
||||
int genlmsg_parse(struct nlmsghdr *nlh,
|
||||
int genlmsg_parse(const struct nlmsghdr *nlh,
|
||||
int hdrlen,
|
||||
struct nlattr *tb[],
|
||||
int maxtype,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue