summaryrefslogtreecommitdiff
path: root/src/shared/in-addr-util.h
Commit message (Collapse)AuthorAgeFilesLines
* networkd: add minimal IP forwarding and masquerading support to .network filesLennart Poettering2015-01-131-0/+3
| | | | | | | | | | | | | | This adds two new settings to networkd's .network files: IPForwarding=yes and IPMasquerade=yes. The former controls the "forwarding" sysctl setting of the interface, thus controlling whether IP forwarding shall be enabled on the specific interface. The latter controls whether a firewall rule shall be installed that exposes traffic coming from the interface as coming from the local host to all other interfaces. This also enables both options by default for container network interfaces, thus making "systemd-nspawn --network-veth" have network connectivity out of the box.
* shared: add minimal firewall manipulation helpers for establishing NAT ↵Lennart Poettering2015-01-131-1/+2
| | | | rules, using libiptc
* shared: in-addr-utils - add default_subnet_mask and default_prefixlen methodsTom Gundersen2014-10-271-0/+2
| | | | | | | These use the (deprecated) IPv4 address classes to deduce the corresponding subnet masks. This is useful when addresses without subnet masks and prefix lengths are given. Make use of these new functions from sd-dhcp-lease.
* networkd: monopolize in_addr utility functions in shared/in-addr-util.hLennart Poettering2014-08-111-0/+1
| | | | | | | Primarily, this means we get rid of net_parse_inaddr(), and replace it everywhere with in_addr_from_string() and in_addr_from_string_auto(). These functions do not clobber the callers arguments on failure, which is more close to our usual coding style.
* resolved: when answer A or AAAA questions, order responses by whether ↵Lennart Poettering2014-07-301-1/+2
| | | | addresses are link-local or not
* resolve: add llmnr responder side for UDP and TCPLennart Poettering2014-07-291-2/+2
| | | | Name defending is still missing.
* in-addr-util: remove family_to_string() APILennart Poettering2014-07-181-3/+0
| | | | | we already have a more complete one with af_to_name(), that is generated from the header files, no need to duplicate this.
* change type for address family to "int"Lennart Poettering2014-07-181-7/+7
| | | | | | | | 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.
* resolved: add LLMNR support for looking up namesLennart Poettering2014-07-181-0/+3
|
* shared: rename PROTO_ADDRESS_SIZE() to FAMILY_ADDRESS_SIZE()Lennart Poettering2014-07-181-3/+3
| | | | | We mostly use "family" to refer to AF_INET, AF_INET6, etc, let's use this terminology here, too
* resolved: add a DNS client stub resolverLennart Poettering2014-07-161-0/+1
| | | | | | | Let's turn resolved into a something truly useful: a fully asynchronous DNS stub resolver that subscribes to network changes. (More to come: caching, LLMNR, mDNS/DNS-SD, DNSSEC, IDN, NSS module)
* shared: split out in_addr related calls from socket-util.[ch] into its ↵Lennart Poettering2014-07-101-0/+44
private in-addr-util.[ch] These are enough calls for a new file, and they are sufficiently different from the sockaddr-related calls, hence let's split this out.