mirror of
https://github.com/systemd/systemd.git
synced 2024-10-31 16:21:26 +03:00
network: suffix types with _t in public headers
Apparently, in our current public headers (i.e. those called sd-*.h) we suffixed typedefs that we use as values with _t, but we didn't do this for enum typedefs. Fix that while this stuff is not actually public yet. With this scheme "value typedefs" now end systematically in _t, and "object typedefs" (i.e. structures that are typically passed around via pointers and not values) do not. No code changes, just some renaming.
This commit is contained in:
parent
95aa3937da
commit
2324fd3a39
@ -35,5 +35,5 @@ struct sd_lldp {
|
||||
#define log_lldp_errno(error, fmt, ...) log_internal(LOG_DEBUG, error, PROJECT_FILE, __LINE__, __func__, "LLDP: " fmt, ##__VA_ARGS__)
|
||||
#define log_lldp(fmt, ...) log_lldp_errno(0, fmt, ##__VA_ARGS__)
|
||||
|
||||
const char* lldp_event_to_string(sd_lldp_event e) _const_;
|
||||
sd_lldp_event lldp_event_from_string(const char *s) _pure_;
|
||||
const char* lldp_event_to_string(sd_lldp_event_t e) _const_;
|
||||
sd_lldp_event_t lldp_event_from_string(const char *s) _pure_;
|
||||
|
@ -40,5 +40,5 @@ struct sd_ndisc {
|
||||
#define log_ndisc_errno(error, fmt, ...) log_internal(LOG_DEBUG, error, PROJECT_FILE, __LINE__, __func__, "NDISC: " fmt, ##__VA_ARGS__)
|
||||
#define log_ndisc(fmt, ...) log_ndisc_errno(0, fmt, ##__VA_ARGS__)
|
||||
|
||||
const char* ndisc_event_to_string(sd_ndisc_event e) _const_;
|
||||
sd_ndisc_event ndisc_event_from_string(const char *s) _pure_;
|
||||
const char* ndisc_event_to_string(sd_ndisc_event_t e) _const_;
|
||||
sd_ndisc_event_t ndisc_event_from_string(const char *s) _pure_;
|
||||
|
@ -99,7 +99,7 @@ int sd_dhcp_lease_get_mtu(sd_dhcp_lease *lease, uint16_t *mtu) {
|
||||
|
||||
int sd_dhcp_lease_get_servers(
|
||||
sd_dhcp_lease *lease,
|
||||
sd_dhcp_lease_server_type what,
|
||||
sd_dhcp_lease_server_type_t what,
|
||||
const struct in_addr **addr) {
|
||||
|
||||
assert_return(lease, -EINVAL);
|
||||
@ -281,7 +281,7 @@ static sd_dhcp_lease *dhcp_lease_free(sd_dhcp_lease *lease) {
|
||||
free(lease->hostname);
|
||||
free(lease->domainname);
|
||||
|
||||
for (sd_dhcp_lease_server_type i = 0; i < _SD_DHCP_LEASE_SERVER_TYPE_MAX; i++)
|
||||
for (sd_dhcp_lease_server_type_t i = 0; i < _SD_DHCP_LEASE_SERVER_TYPE_MAX; i++)
|
||||
free(lease->servers[i].addr);
|
||||
|
||||
free(lease->static_route);
|
||||
|
@ -149,7 +149,7 @@ static sd_dhcp_server *dhcp_server_free(sd_dhcp_server *server) {
|
||||
|
||||
free(server->timezone);
|
||||
|
||||
for (sd_dhcp_lease_server_type i = 0; i < _SD_DHCP_LEASE_SERVER_TYPE_MAX; i++)
|
||||
for (sd_dhcp_lease_server_type_t i = 0; i < _SD_DHCP_LEASE_SERVER_TYPE_MAX; i++)
|
||||
free(server->servers[i].addr);
|
||||
|
||||
hashmap_free(server->leases_by_client_id);
|
||||
@ -509,7 +509,7 @@ static int server_send_ack(
|
||||
return r;
|
||||
}
|
||||
|
||||
for (sd_dhcp_lease_server_type k = 0; k < _SD_DHCP_LEASE_SERVER_TYPE_MAX; k++) {
|
||||
for (sd_dhcp_lease_server_type_t k = 0; k < _SD_DHCP_LEASE_SERVER_TYPE_MAX; k++) {
|
||||
|
||||
if (server->servers[k].size <= 0)
|
||||
continue;
|
||||
@ -1118,7 +1118,7 @@ int sd_dhcp_server_set_default_lease_time(sd_dhcp_server *server, uint32_t t) {
|
||||
|
||||
int sd_dhcp_server_set_servers(
|
||||
sd_dhcp_server *server,
|
||||
sd_dhcp_lease_server_type what,
|
||||
sd_dhcp_lease_server_type_t what,
|
||||
const struct in_addr addresses[],
|
||||
size_t n_addresses) {
|
||||
|
||||
|
@ -27,7 +27,7 @@ static const char * const lldp_event_table[_SD_LLDP_EVENT_MAX] = {
|
||||
[SD_LLDP_EVENT_REFRESHED] = "refreshed",
|
||||
};
|
||||
|
||||
DEFINE_STRING_TABLE_LOOKUP(lldp_event, sd_lldp_event);
|
||||
DEFINE_STRING_TABLE_LOOKUP(lldp_event, sd_lldp_event_t);
|
||||
|
||||
static void lldp_flush_neighbors(sd_lldp *lldp) {
|
||||
assert(lldp);
|
||||
@ -35,7 +35,7 @@ static void lldp_flush_neighbors(sd_lldp *lldp) {
|
||||
hashmap_clear(lldp->neighbor_by_id);
|
||||
}
|
||||
|
||||
static void lldp_callback(sd_lldp *lldp, sd_lldp_event event, sd_lldp_neighbor *n) {
|
||||
static void lldp_callback(sd_lldp *lldp, sd_lldp_event_t event, sd_lldp_neighbor *n) {
|
||||
assert(lldp);
|
||||
assert(event >= 0 && event < _SD_LLDP_EVENT_MAX);
|
||||
|
||||
|
@ -28,9 +28,9 @@ static const char * const ndisc_event_table[_SD_NDISC_EVENT_MAX] = {
|
||||
[SD_NDISC_EVENT_ROUTER] = "router",
|
||||
};
|
||||
|
||||
DEFINE_STRING_TABLE_LOOKUP(ndisc_event, sd_ndisc_event);
|
||||
DEFINE_STRING_TABLE_LOOKUP(ndisc_event, sd_ndisc_event_t);
|
||||
|
||||
static void ndisc_callback(sd_ndisc *ndisc, sd_ndisc_event event, sd_ndisc_router *rt) {
|
||||
static void ndisc_callback(sd_ndisc *ndisc, sd_ndisc_event_t event, sd_ndisc_router *rt) {
|
||||
assert(ndisc);
|
||||
assert(event >= 0 && event < _SD_NDISC_EVENT_MAX);
|
||||
|
||||
|
@ -30,7 +30,7 @@ int lldp_network_bind_raw_socket(int ifindex) {
|
||||
return test_fd[0];
|
||||
}
|
||||
|
||||
static void lldp_handler(sd_lldp *lldp, sd_lldp_event event, sd_lldp_neighbor *n, void *userdata) {
|
||||
static void lldp_handler(sd_lldp *lldp, sd_lldp_event_t event, sd_lldp_neighbor *n, void *userdata) {
|
||||
lldp_handler_calls++;
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ int icmp6_send_router_solicitation(int s, const struct ether_addr *ether_addr) {
|
||||
return send_ra_function(0);
|
||||
}
|
||||
|
||||
static void test_callback(sd_ndisc *nd, sd_ndisc_event event, sd_ndisc_router *rt, void *userdata) {
|
||||
static void test_callback(sd_ndisc *nd, sd_ndisc_event_t event, sd_ndisc_router *rt, void *userdata) {
|
||||
sd_event *e = userdata;
|
||||
static unsigned idx = 0;
|
||||
uint64_t flags_array[] = {
|
||||
|
@ -25,9 +25,9 @@ static const genl_family genl_families[] = {
|
||||
int sd_genl_socket_open(sd_netlink **ret) {
|
||||
return netlink_open_family(ret, NETLINK_GENERIC);
|
||||
}
|
||||
static int lookup_id(sd_netlink *nl, sd_genl_family family, uint16_t *id);
|
||||
static int lookup_id(sd_netlink *nl, sd_genl_family_t family, uint16_t *id);
|
||||
|
||||
static int genl_message_new(sd_netlink *nl, sd_genl_family family, uint16_t nlmsg_type, uint8_t cmd, sd_netlink_message **ret) {
|
||||
static int genl_message_new(sd_netlink *nl, sd_genl_family_t family, uint16_t nlmsg_type, uint8_t cmd, sd_netlink_message **ret) {
|
||||
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *m = NULL;
|
||||
const NLType *genl_cmd_type, *nl_type;
|
||||
const NLTypeSystem *type_system;
|
||||
@ -71,7 +71,7 @@ static int genl_message_new(sd_netlink *nl, sd_genl_family family, uint16_t nlms
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sd_genl_message_new(sd_netlink *nl, sd_genl_family family, uint8_t cmd, sd_netlink_message **ret) {
|
||||
int sd_genl_message_new(sd_netlink *nl, sd_genl_family_t family, uint8_t cmd, sd_netlink_message **ret) {
|
||||
uint16_t id;
|
||||
int r;
|
||||
|
||||
@ -82,7 +82,7 @@ int sd_genl_message_new(sd_netlink *nl, sd_genl_family family, uint8_t cmd, sd_n
|
||||
return genl_message_new(nl, family, id, cmd, ret);
|
||||
}
|
||||
|
||||
static int lookup_id(sd_netlink *nl, sd_genl_family family, uint16_t *id) {
|
||||
static int lookup_id(sd_netlink *nl, sd_genl_family_t family, uint16_t *id) {
|
||||
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL, *reply = NULL;
|
||||
uint16_t u;
|
||||
void *v;
|
||||
@ -127,7 +127,7 @@ static int lookup_id(sd_netlink *nl, sd_genl_family family, uint16_t *id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int nlmsg_type_to_genl_family(const sd_netlink *nl, uint16_t type, sd_genl_family *ret) {
|
||||
int nlmsg_type_to_genl_family(const sd_netlink *nl, uint16_t type, sd_genl_family_t *ret) {
|
||||
void *p;
|
||||
|
||||
assert_return(nl, -EINVAL);
|
||||
@ -151,7 +151,7 @@ int nlmsg_type_to_genl_family(const sd_netlink *nl, uint16_t type, sd_genl_famil
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sd_genl_message_get_family(const sd_netlink *nl, const sd_netlink_message *m, sd_genl_family *family) {
|
||||
int sd_genl_message_get_family(const sd_netlink *nl, const sd_netlink_message *m, sd_genl_family_t *family) {
|
||||
uint16_t type;
|
||||
int r;
|
||||
|
||||
|
@ -3,4 +3,4 @@
|
||||
|
||||
#include "sd-netlink.h"
|
||||
|
||||
int nlmsg_type_to_genl_family(const sd_netlink *nl, uint16_t type, sd_genl_family *ret);
|
||||
int nlmsg_type_to_genl_family(const sd_netlink *nl, uint16_t type, sd_genl_family_t *ret);
|
||||
|
@ -1636,7 +1636,7 @@ const NLTypeSystem *type_system_get_root(int protocol) {
|
||||
}
|
||||
|
||||
int type_system_root_get_type(sd_netlink *nl, const NLType **ret, uint16_t type) {
|
||||
sd_genl_family family;
|
||||
sd_genl_family_t family;
|
||||
const NLType *nl_type;
|
||||
int r;
|
||||
|
||||
|
@ -60,7 +60,7 @@ static Address* link_find_dhcp_server_address(Link *link) {
|
||||
|
||||
static int link_push_uplink_to_dhcp_server(
|
||||
Link *link,
|
||||
sd_dhcp_lease_server_type what,
|
||||
sd_dhcp_lease_server_type_t what,
|
||||
sd_dhcp_server *s) {
|
||||
|
||||
_cleanup_free_ struct in_addr *addresses = NULL;
|
||||
@ -307,7 +307,7 @@ int dhcp4_server_configure(Link *link) {
|
||||
return log_link_error_errno(link, r, "Failed to set default lease time for DHCPv4 server instance: %m");
|
||||
}
|
||||
|
||||
for (sd_dhcp_lease_server_type type = 0; type < _SD_DHCP_LEASE_SERVER_TYPE_MAX; type ++) {
|
||||
for (sd_dhcp_lease_server_type_t type = 0; type < _SD_DHCP_LEASE_SERVER_TYPE_MAX; type ++) {
|
||||
|
||||
if (!link->network->dhcp_server_emit[type].emit)
|
||||
continue;
|
||||
|
@ -2823,7 +2823,7 @@ static void serialize_addresses(
|
||||
char **addresses,
|
||||
sd_dhcp_lease *lease,
|
||||
bool conditional,
|
||||
sd_dhcp_lease_server_type what,
|
||||
sd_dhcp_lease_server_type_t what,
|
||||
sd_dhcp6_lease *lease6,
|
||||
bool conditional6,
|
||||
int (*lease6_get_addr)(sd_dhcp6_lease*, const struct in6_addr**),
|
||||
|
@ -47,7 +47,7 @@ static bool link_lldp_rx_enabled(Link *link) {
|
||||
return link->network->lldp_mode != LLDP_MODE_NO;
|
||||
}
|
||||
|
||||
static void lldp_handler(sd_lldp *lldp, sd_lldp_event event, sd_lldp_neighbor *n, void *userdata) {
|
||||
static void lldp_handler(sd_lldp *lldp, sd_lldp_event_t event, sd_lldp_neighbor *n, void *userdata) {
|
||||
Link *link = userdata;
|
||||
int r;
|
||||
|
||||
|
@ -1274,7 +1274,7 @@ static int ndisc_router_handler(Link *link, sd_ndisc_router *rt) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ndisc_handler(sd_ndisc *nd, sd_ndisc_event event, sd_ndisc_router *rt, void *userdata) {
|
||||
static void ndisc_handler(sd_ndisc *nd, sd_ndisc_event_t event, sd_ndisc_router *rt, void *userdata) {
|
||||
Link *link = userdata;
|
||||
int r;
|
||||
|
||||
|
@ -664,7 +664,7 @@ static Network *network_free(Network *network) {
|
||||
|
||||
free(network->dhcp_server_timezone);
|
||||
|
||||
for (sd_dhcp_lease_server_type t = 0; t < _SD_DHCP_LEASE_SERVER_TYPE_MAX; t++)
|
||||
for (sd_dhcp_lease_server_type_t t = 0; t < _SD_DHCP_LEASE_SERVER_TYPE_MAX; t++)
|
||||
free(network->dhcp_server_emit[t].addresses);
|
||||
|
||||
set_free_free(network->dnssec_negative_trust_anchors);
|
||||
|
@ -65,7 +65,7 @@ DEFINE_STRING_TABLE_LOOKUP(duplicate_address_detection_address_family, AddressFa
|
||||
DEFINE_CONFIG_PARSE_ENUM(config_parse_link_local_address_family, link_local_address_family,
|
||||
AddressFamily, "Failed to parse option");
|
||||
DEFINE_STRING_TABLE_LOOKUP_FROM_STRING(dhcp_deprecated_address_family, AddressFamily);
|
||||
DEFINE_STRING_TABLE_LOOKUP(dhcp_lease_server_type, sd_dhcp_lease_server_type);
|
||||
DEFINE_STRING_TABLE_LOOKUP(dhcp_lease_server_type, sd_dhcp_lease_server_type_t);
|
||||
|
||||
static AddressFamily address_family_compat_from_string(const char *s) {
|
||||
if (streq_ptr(s, "yes")) /* compat name */
|
||||
|
@ -46,8 +46,8 @@ AddressFamily duplicate_address_detection_address_family_from_string(const char
|
||||
|
||||
AddressFamily dhcp_deprecated_address_family_from_string(const char *s) _pure_;
|
||||
|
||||
const char *dhcp_lease_server_type_to_string(sd_dhcp_lease_server_type t) _const_;
|
||||
sd_dhcp_lease_server_type dhcp_lease_server_type_from_string(const char *s) _pure_;
|
||||
const char *dhcp_lease_server_type_to_string(sd_dhcp_lease_server_type_t t) _const_;
|
||||
sd_dhcp_lease_server_type_t dhcp_lease_server_type_from_string(const char *s) _pure_;
|
||||
|
||||
int kernel_route_expiration_supported(void);
|
||||
|
||||
|
@ -46,10 +46,10 @@ int main(int argc, char **argv) {
|
||||
test_table_sparse(macvlan_mode, NETDEV_MACVLAN_MODE);
|
||||
test_table_sparse(address_family, ADDRESS_FAMILY);
|
||||
|
||||
assert_cc(sizeof(sd_lldp_event) == sizeof(int64_t));
|
||||
assert_cc(sizeof(sd_ndisc_event) == sizeof(int64_t));
|
||||
assert_cc(sizeof(sd_dhcp_lease_server_type) == sizeof(int64_t));
|
||||
assert_cc(sizeof(sd_genl_family) == sizeof(int64_t));
|
||||
assert_cc(sizeof(sd_lldp_event_t) == sizeof(int64_t));
|
||||
assert_cc(sizeof(sd_ndisc_event_t) == sizeof(int64_t));
|
||||
assert_cc(sizeof(sd_dhcp_lease_server_type_t) == sizeof(int64_t));
|
||||
assert_cc(sizeof(sd_genl_family_t) == sizeof(int64_t));
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
int wifi_get_interface(sd_netlink *genl, int ifindex, enum nl80211_iftype *iftype, char **ssid) {
|
||||
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *m = NULL, *reply = NULL;
|
||||
sd_genl_family family;
|
||||
sd_genl_family_t family;
|
||||
int r;
|
||||
|
||||
assert(genl);
|
||||
@ -75,7 +75,7 @@ nodata:
|
||||
|
||||
int wifi_get_station(sd_netlink *genl, int ifindex, struct ether_addr *bssid) {
|
||||
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *m = NULL, *reply = NULL;
|
||||
sd_genl_family family;
|
||||
sd_genl_family_t family;
|
||||
int r;
|
||||
|
||||
assert(genl);
|
||||
|
@ -34,7 +34,7 @@ typedef struct sd_dhcp_route sd_dhcp_route;
|
||||
sd_dhcp_lease *sd_dhcp_lease_ref(sd_dhcp_lease *lease);
|
||||
sd_dhcp_lease *sd_dhcp_lease_unref(sd_dhcp_lease *lease);
|
||||
|
||||
typedef enum sd_dhcp_lease_server_type {
|
||||
typedef enum sd_dhcp_lease_server_type_t {
|
||||
SD_DHCP_LEASE_DNS,
|
||||
SD_DHCP_LEASE_NTP,
|
||||
SD_DHCP_LEASE_SIP,
|
||||
@ -44,7 +44,7 @@ typedef enum sd_dhcp_lease_server_type {
|
||||
_SD_DHCP_LEASE_SERVER_TYPE_MAX,
|
||||
_SD_DHCP_LEASE_SERVER_TYPE_INVALID = -EINVAL,
|
||||
_SD_ENUM_FORCE_S64(DHCP_LEASE_SERVER_TYPE),
|
||||
} sd_dhcp_lease_server_type;
|
||||
} sd_dhcp_lease_server_type_t;
|
||||
|
||||
int sd_dhcp_lease_get_address(sd_dhcp_lease *lease, struct in_addr *addr);
|
||||
int sd_dhcp_lease_get_lifetime(sd_dhcp_lease *lease, uint32_t *lifetime);
|
||||
@ -55,7 +55,7 @@ int sd_dhcp_lease_get_netmask(sd_dhcp_lease *lease, struct in_addr *addr);
|
||||
int sd_dhcp_lease_get_router(sd_dhcp_lease *lease, const struct in_addr **addr);
|
||||
int sd_dhcp_lease_get_next_server(sd_dhcp_lease *lease, struct in_addr *addr);
|
||||
int sd_dhcp_lease_get_server_identifier(sd_dhcp_lease *lease, struct in_addr *addr);
|
||||
int sd_dhcp_lease_get_servers(sd_dhcp_lease *lease, sd_dhcp_lease_server_type what, const struct in_addr **addr);
|
||||
int sd_dhcp_lease_get_servers(sd_dhcp_lease *lease, sd_dhcp_lease_server_type_t what, const struct in_addr **addr);
|
||||
int sd_dhcp_lease_get_dns(sd_dhcp_lease *lease, const struct in_addr **addr);
|
||||
int sd_dhcp_lease_get_ntp(sd_dhcp_lease *lease, const struct in_addr **addr);
|
||||
int sd_dhcp_lease_get_sip(sd_dhcp_lease *lease, const struct in_addr **addr);
|
||||
|
@ -60,7 +60,7 @@ int sd_dhcp_server_set_emit_router(sd_dhcp_server *server, int enabled);
|
||||
|
||||
int sd_dhcp_server_set_servers(
|
||||
sd_dhcp_server *server,
|
||||
sd_dhcp_lease_server_type what,
|
||||
sd_dhcp_lease_server_type_t what,
|
||||
const struct in_addr addresses[],
|
||||
size_t n_addresses);
|
||||
|
||||
|
@ -122,7 +122,7 @@ enum {
|
||||
typedef struct sd_lldp sd_lldp;
|
||||
typedef struct sd_lldp_neighbor sd_lldp_neighbor;
|
||||
|
||||
typedef enum sd_lldp_event {
|
||||
typedef enum sd_lldp_event_t {
|
||||
SD_LLDP_EVENT_ADDED,
|
||||
SD_LLDP_EVENT_REMOVED,
|
||||
SD_LLDP_EVENT_UPDATED,
|
||||
@ -130,9 +130,9 @@ typedef enum sd_lldp_event {
|
||||
_SD_LLDP_EVENT_MAX,
|
||||
_SD_LLDP_EVENT_INVALID = -EINVAL,
|
||||
_SD_ENUM_FORCE_S64(LLDP_EVENT),
|
||||
} sd_lldp_event;
|
||||
} sd_lldp_event_t;
|
||||
|
||||
typedef void (*sd_lldp_callback_t)(sd_lldp *lldp, sd_lldp_event event, sd_lldp_neighbor *n, void *userdata);
|
||||
typedef void (*sd_lldp_callback_t)(sd_lldp *lldp, sd_lldp_event_t event, sd_lldp_neighbor *n, void *userdata);
|
||||
|
||||
int sd_lldp_new(sd_lldp **ret);
|
||||
sd_lldp* sd_lldp_ref(sd_lldp *lldp);
|
||||
|
@ -55,15 +55,15 @@ enum {
|
||||
typedef struct sd_ndisc sd_ndisc;
|
||||
typedef struct sd_ndisc_router sd_ndisc_router;
|
||||
|
||||
typedef enum sd_ndisc_event {
|
||||
typedef enum sd_ndisc_event_t {
|
||||
SD_NDISC_EVENT_TIMEOUT,
|
||||
SD_NDISC_EVENT_ROUTER,
|
||||
_SD_NDISC_EVENT_MAX,
|
||||
_SD_NDISC_EVENT_INVALID = -EINVAL,
|
||||
_SD_ENUM_FORCE_S64(NDISC_EVENT),
|
||||
} sd_ndisc_event;
|
||||
} sd_ndisc_event_t;
|
||||
|
||||
typedef void (*sd_ndisc_callback_t)(sd_ndisc *nd, sd_ndisc_event event, sd_ndisc_router *rt, void *userdata);
|
||||
typedef void (*sd_ndisc_callback_t)(sd_ndisc *nd, sd_ndisc_event_t event, sd_ndisc_router *rt, void *userdata);
|
||||
|
||||
int sd_ndisc_new(sd_ndisc **ret);
|
||||
sd_ndisc *sd_ndisc_ref(sd_ndisc *nd);
|
||||
|
@ -35,7 +35,7 @@ typedef struct sd_genl_socket sd_genl_socket;
|
||||
typedef struct sd_netlink_message sd_netlink_message;
|
||||
typedef struct sd_netlink_slot sd_netlink_slot;
|
||||
|
||||
typedef enum sd_genl_family {
|
||||
typedef enum sd_genl_family_t {
|
||||
SD_GENL_ERROR,
|
||||
SD_GENL_DONE,
|
||||
SD_GENL_ID_CTRL,
|
||||
@ -47,7 +47,7 @@ typedef enum sd_genl_family {
|
||||
_SD_GENL_FAMILY_MAX,
|
||||
_SD_GENL_FAMILY_INVALID = -EINVAL,
|
||||
_SD_ENUM_FORCE_S64(GENL_FAMILY)
|
||||
} sd_genl_family;
|
||||
} sd_genl_family_t;
|
||||
|
||||
/* callback */
|
||||
|
||||
@ -249,8 +249,8 @@ int sd_nfnl_nft_message_add_setelem_end(sd_netlink_message *m);
|
||||
|
||||
/* genl */
|
||||
int sd_genl_socket_open(sd_netlink **nl);
|
||||
int sd_genl_message_new(sd_netlink *nl, sd_genl_family family, uint8_t cmd, sd_netlink_message **m);
|
||||
int sd_genl_message_get_family(const sd_netlink *nl, const sd_netlink_message *m, sd_genl_family *family);
|
||||
int sd_genl_message_new(sd_netlink *nl, sd_genl_family_t family, uint8_t cmd, sd_netlink_message **m);
|
||||
int sd_genl_message_get_family(const sd_netlink *nl, const sd_netlink_message *m, sd_genl_family_t *family);
|
||||
|
||||
/* slot */
|
||||
sd_netlink_slot *sd_netlink_slot_ref(sd_netlink_slot *nl);
|
||||
|
Loading…
Reference in New Issue
Block a user