rtnl-internal.h revision 98dd77e86e0cc339543cc8711ff908e6929f0636
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering/***
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering This file is part of systemd.
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering Copyright 2013 Tom Gundersen <teg@jklm.no>
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering systemd is free software; you can redistribute it and/or modify it
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering under the terms of the GNU Lesser General Public License as published by
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering (at your option) any later version.
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering systemd is distributed in the hope that it will be useful, but
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering Lesser General Public License for more details.
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering You should have received a copy of the GNU Lesser General Public License
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering***/
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering
bd5f920f1288c0d4d488629fadf067f709227030Lennart Poettering#include "refcnt.h"
bd5f920f1288c0d4d488629fadf067f709227030Lennart Poettering
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poetteringstruct sd_rtnl {
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering RefCount n_ref;
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering int fd;
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering union {
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering struct sockaddr sa;
bd5f920f1288c0d4d488629fadf067f709227030Lennart Poettering struct sockaddr_nl nl;
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering } sockaddr;
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering unsigned serial;
a4152e3fe28b53b8919cc404dd7eca7ead1bf9bdLennart Poettering};
5892a914d173e4b968d2a14fbf717373dee3999aDaniel Mack
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering#define RTNL_DEFAULT_TIMEOUT ((usec_t) (10 * USEC_PER_SEC))
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering
a4152e3fe28b53b8919cc404dd7eca7ead1bf9bdLennart Poetteringint message_get_errno(sd_rtnl_message *m);
a4152e3fe28b53b8919cc404dd7eca7ead1bf9bdLennart Poetteringint message_get_serial(sd_rtnl_message *m);
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poetteringint message_seal(sd_rtnl *nl, sd_rtnl_message *m);
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poetteringint socket_write_message(sd_rtnl *nl, sd_rtnl_message *m);
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poetteringint socket_read_message(sd_rtnl *nl, sd_rtnl_message **ret);
e821075a23fdfa3ca7738fc30bb2d4c430fe10c0Lennart Poettering