chiark / gitweb /
log: move log_syntax() into src/shared/log.c, and make it more similar to the other...
[elogind.git] / src / systemd / sd-pppoe.h
1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
3 #ifndef foosdpppoefoo
4 #define foosdpppoefoo
5
6 /***
7   This file is part of systemd.
8
9   Copyright (C) 2014 Tom Gundersen
10
11   systemd is free software; you can redistribute it and/or modify it
12   under the terms of the GNU Lesser General Public License as published by
13   the Free Software Foundation; either version 2.1 of the License, or
14   (at your option) any later version.
15
16   systemd is distributed in the hope that it will be useful, but
17   WITHOUT ANY WARRANTY; without even the implied warranty of
18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19   Lesser General Public License for more details.
20
21   You should have received a copy of the GNU Lesser General Public License
22   along with systemd; If not, see <http://www.gnu.org/licenses/>.
23 ***/
24
25 #include <stdbool.h>
26 #include <net/ethernet.h>
27
28 #include "sd-event.h"
29
30 #include "sparse-endian.h"
31
32 enum {
33         PPPOE_EVENT_RUNNING                     = 0,
34         PPPOE_EVENT_STOPPED                     = 1,
35 };
36
37 typedef struct sd_pppoe sd_pppoe;
38 typedef void (*sd_pppoe_cb_t)(sd_pppoe *ppp, int event, void *userdata);
39
40 int sd_pppoe_detach_event(sd_pppoe *ppp);
41 int sd_pppoe_attach_event(sd_pppoe *ppp, sd_event *event, int priority);
42 int sd_pppoe_get_channel(sd_pppoe *ppp, int *channel);
43 int sd_pppoe_set_callback(sd_pppoe *ppp, sd_pppoe_cb_t cb, void *userdata);
44 int sd_pppoe_set_ifindex(sd_pppoe *ppp, int ifindex);
45 int sd_pppoe_set_ifname(sd_pppoe *ppp, const char *ifname);
46 int sd_pppoe_set_service_name(sd_pppoe *ppp, const char *service_name);
47 int sd_pppoe_start(sd_pppoe *ppp);
48 int sd_pppoe_stop(sd_pppoe *ppp);
49 sd_pppoe *sd_pppoe_ref(sd_pppoe *ppp);
50 sd_pppoe *sd_pppoe_unref(sd_pppoe *ppp);
51 int sd_pppoe_new (sd_pppoe **ret);
52
53 #endif