summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-18 16:09:30 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-18 16:10:51 +0200
commit0dd25fb9f005d8ab7ac4bc10a609d00569f8c56a (patch)
tree2f253672d8a0a97c8c19ba1ce2cad26a5bef62a8 /src/network
parentf41925b4e442a34c93ad120ef1426c974a047ed1 (diff)
change type for address family to "int"
Let's settle on a single type for all address family values, even if UNIX is very inconsitent on the precise type otherwise. Given that socket() is the primary entrypoint for the sockets API, and that uses "int", and "int" is relatively simple and generic, we settle on "int" for this.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-address-pool.c4
-rw-r--r--src/network/networkd-manager.c2
-rw-r--r--src/network/networkd-netdev.h2
-rw-r--r--src/network/networkd.h12
4 files changed, 10 insertions, 10 deletions
diff --git a/src/network/networkd-address-pool.c b/src/network/networkd-address-pool.c
index a5079add02..8abf82e18c 100644
--- a/src/network/networkd-address-pool.c
+++ b/src/network/networkd-address-pool.c
@@ -26,7 +26,7 @@
int address_pool_new(
Manager *m,
AddressPool **ret,
- unsigned family,
+ int family,
const union in_addr_union *u,
unsigned prefixlen) {
@@ -54,7 +54,7 @@ int address_pool_new(
int address_pool_new_from_string(
Manager *m,
AddressPool **ret,
- unsigned family,
+ int family,
const char *p,
unsigned prefixlen) {
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index e363fb0c1b..b0e3191a00 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -467,7 +467,7 @@ finish:
return r;
}
-int manager_address_pool_acquire(Manager *m, unsigned family, unsigned prefixlen, union in_addr_union *found) {
+int manager_address_pool_acquire(Manager *m, int family, unsigned prefixlen, union in_addr_union *found) {
AddressPool *p;
int r;
diff --git a/src/network/networkd-netdev.h b/src/network/networkd-netdev.h
index a523522887..042e1601c6 100644
--- a/src/network/networkd-netdev.h
+++ b/src/network/networkd-netdev.h
@@ -104,7 +104,7 @@ struct NetDev {
unsigned ttl;
unsigned tos;
- unsigned char family;
+ int family;
union in_addr_union local;
union in_addr_union remote;
union in_addr_union group;
diff --git a/src/network/networkd.h b/src/network/networkd.h
index 9abc0d46ec..f1c7f204ea 100644
--- a/src/network/networkd.h
+++ b/src/network/networkd.h
@@ -115,7 +115,7 @@ struct Address {
Network *network;
uint64_t section;
- unsigned char family;
+ int family;
unsigned char prefixlen;
unsigned char scope;
char *label;
@@ -133,7 +133,7 @@ struct Route {
Network *network;
uint64_t section;
- unsigned char family;
+ int family;
unsigned char dst_prefixlen;
unsigned char scope;
uint32_t metrics;
@@ -209,7 +209,7 @@ struct Link {
struct AddressPool {
Manager *manager;
- unsigned family;
+ int family;
unsigned prefixlen;
union in_addr_union in_addr;
@@ -255,7 +255,7 @@ int manager_bus_listen(Manager *m);
int manager_save(Manager *m);
-int manager_address_pool_acquire(Manager *m, unsigned family, unsigned prefixlen, union in_addr_union *found);
+int manager_address_pool_acquire(Manager *m, int family, unsigned prefixlen, union in_addr_union *found);
DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);
#define _cleanup_manager_free_ _cleanup_(manager_freep)
@@ -390,8 +390,8 @@ int config_parse_dhcp(const char *unit, const char *filename, unsigned line,
/* Address Pool */
-int address_pool_new(Manager *m, AddressPool **ret, unsigned family, const union in_addr_union *u, unsigned prefixlen);
-int address_pool_new_from_string(Manager *m, AddressPool **ret, unsigned family, const char *p, unsigned prefixlen);
+int address_pool_new(Manager *m, AddressPool **ret, int family, const union in_addr_union *u, unsigned prefixlen);
+int address_pool_new_from_string(Manager *m, AddressPool **ret, int family, const char *p, unsigned prefixlen);
void address_pool_free(AddressPool *p);
int address_pool_acquire(AddressPool *p, unsigned prefixlen, union in_addr_union *found);