b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
22805d9207d5242681e5667ee304572e4abf9b94 |
|
20-Jan-2016 |
Beniamino Galvani <bgalvani@redhat.com> |
dhcp: make DHCP_OPTION_* enum public
libsystemd-network provides the public function
sd_dhcp_client_set_request_option() to enable the request of a given
DHCP option. However the enum defining such options is defined in the
internal header dhcp-protocol.h. Move the enum definition to the
public header sd-dhcp-client.h and properly namespace values. |
4afd3348c7506dd1d36305b7bcb9feb8952b9d6b |
|
27-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easy
GLIB has recently started to officially support the gcc cleanup
attribute in its public API, hence let's do the same for our APIs.
With this patch we'll define an xyz_unrefp() call for each public
xyz_unref() call, to make it easy to use inside a
__attribute__((cleanup())) expression. Then, all code is ported over to
make use of this.
The new calls are also documented in the man pages, with examples how to
use them (well, I only added docs where the _unref() call itself already
had docs, and the examples, only cover sd_bus_unrefp() and
sd_event_unrefp()).
This also renames sd_lldp_free() to sd_lldp_unref(), since that's how we
tend to call our destructors these days.
Note that this defines no public macro that wraps gcc's attribute and
makes it easier to use. While I think it's our duty in the library to
make our stuff easy to use, I figure it's not our duty to make gcc's own
features easy to use on its own. Most likely, client code which wants to
make use of this should define its own:
#define _cleanup_(function) __attribute__((cleanup(function)))
Or similar, to make the gcc feature easier to use.
Making this logic public has the benefit that we can remove three header
files whose only purpose was to define these functions internally.
See #2008. |
933f9caeeb2b3c1b951d330e04beb04226e5a890 |
|
16-Nov-2015 |
Daniel Mack <daniel@zonque.org> |
siphash24: let siphash24_finalize() and siphash24() return the result directly
Rather than passing a pointer to return the result, return it directly
from the function calls.
Also, return the result in native endianess, and let the callers care
about the conversion. For hash tables and bloom filters, we don't care,
but in order to keep MAC addresses and DHCP client IDs stable, we
explicitly convert to LE. |
dbe81cbd2a93088236a2e4e41eeb33378940f7b9 |
|
16-Nov-2015 |
Martin Pitt <martin.pitt@ubuntu.com> |
siphash24: change result argument to uint64_t
Change the "out" parameter from uint8_t[8] to uint64_t. On architectures which
enforce pointer alignment this fixes crashes when we previously cast an
unaligned array to uint64_t*, and on others this should at least improve
performance as the compiler now aligns these properly.
This also simplifies the code in most cases by getting rid of typecasts. The
only place which we can't change is struct duid's en.id, as that is _packed_
and public API, so we can't enforce alignment of the "id" field and have to
use memcpy instead. |
07630cea1f3a845c09309f197ac7c4f11edd3b62 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split our string related calls from util.[ch] into its own file string-util.[ch]
There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.
This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.
Also touches a few unrelated include files. |
0cb3c286883b694fc52a18a3b559ff98931641f3 |
|
06-Oct-2015 |
Tom Gundersen <teg@jklm.no> |
siphash24: unify API
Make the API of the new helpers more similar to the old wrapper.
In particular we now return the hash as a byte string to avoid
any endianness problems. |
b826ab586c9e0a9c0d438a75c28cf3a8ab485929 |
|
05-Oct-2015 |
Tom Gundersen <teg@jklm.no> |
hashmap: refactor hash_func
All our hash functions are based on siphash24(), factor out
siphash_init() and siphash24_finalize() and pass the siphash
state to the hash functions rather than the hash key.
This simplifies the hash functions, and in particular makes
composition simpler as calling siphash24_compress() repeatedly
on separate chunks of input has the same effect as first
concatenating the input and then calling siphash23_compress()
on the result. |
99634696183dfabae20104e58157c69029a11594 |
|
31-Aug-2015 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp-server: simplify pool creation
Merge sd_dhcp_server_set_address() and sd_dhcp_server_set_lease_pool() into
sd_dhcp_server_configure_pool() as the behavior of the two former depends
on the order they are called in. The flexibility is not needed, so let's
just do this in one call. |
2eec67acbb00593e414549a7e5b35eb7dd776b1b |
|
23-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused includes
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use. |
2f8557eb3649840d76d9eb7d688a3c5c2922d31c |
|
14-Aug-2014 |
Tom Gundersen <teg@jklm.no> |
test: dhcp-server - fix test
Reported by Corey Hammerton on G+ |
59b8f6b628145586e87b8a4f6e29c755ad7d61ed |
|
04-Aug-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp-server: always send out ROUTER and SUBNET_MASK
For now we simply take these values from the server's address. |
6f08fb7b34b4eebf664de83c8bc7b9941658aeb4 |
|
13-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp-server: test - skip when lacking perms |
87322b3aee0dc649ff1ae7a403dcc9d7305baba2 |
|
13-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp-server: track bound leases
Make sure we don't hand out the same IP twice. We still don't
handle lease expiry. |
bd57b45029ff25067704c9538e79f31e71c10045 |
|
13-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp-server: add basic NAK support |
2dead8129f7b6fe644e17e1dc1739bebacfe1364 |
|
13-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp-server: add basic REQUEST/ACK support |
4dc355680460fdc8e0d590d8572dff1b6a257d88 |
|
13-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp-server: add basic DISCOVER/OFFER support |
20af7091de0cdf92bf299addfc3f96c3ef805bd8 |
|
13-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp-server: add support for setting the server address |
be077570f779664ed87b50f60608df9fbe258821 |
|
13-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp-server: add basic message handling and verification |
3a864fe4a894745ac61f1ecabd7cadf04139a284 |
|
13-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp-server: bind to a given interface
We will (at least at first), restrict our focus to running the server
on at most one interface. |
ff734080aa02cd70b13bc0fdeec4a5886166163a |
|
13-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp-server: add basic functionality for starting/stopping server
Bind to UDP socket and listen for messages, discarding anything we receive. |
b44cd8821087f2afebf85fec5b588f5720a9415c |
|
13-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
sd-dhcp-server: add basic functionality for creating/destroying server instance |