This commit is contained in:
Daniel Adolfsson 2019-12-11 14:41:00 +01:00
parent 89864c330c
commit e980a38b4e
10 changed files with 13 additions and 17 deletions

View File

@ -24,8 +24,8 @@
# define NDPPD_ALLOC_SIZE 16384
#endif
#include "ndppd.h"
#include "alloc.h"
#include "ndppd.h"
typedef struct ndL_chunk ndL_chunk_t;

View File

@ -16,12 +16,11 @@
* You should have received a copy of the GNU General Public License
* along with ndppd. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef NDPPD_CF_H
#define NDPPD_CF_H
#ifndef NDPPD_CONF_H
#define NDPPD_CONF_H
#include "ndppd.h"
/* cf.c */
bool nd_conf_load(const char *path);
#endif // NDPPD_CF_H
#endif /* NDPPD_CONF_H */

View File

@ -16,8 +16,8 @@
* You should have received a copy of the GNU General Public License
* along with ndppd. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef NDPPD_IFA_H
#define NDPPD_IFA_H
#ifndef NDPPD_IFACE_H
#define NDPPD_IFACE_H
#include "ndppd.h"
#include <net/if.h>
@ -51,4 +51,4 @@ bool nd_iface_set_allmulti(nd_iface_t *iface, bool on);
bool nd_iface_set_promisc(nd_iface_t *iface, bool on);
void nd_iface_cleanup();
#endif /* NDPPD_IFA_H */
#endif /* NDPPD_IFACE_H */

View File

@ -119,7 +119,6 @@ static bool ndL_daemonize()
close(STDOUT_FILENO);
close(STDERR_FILENO);
return true;
}

View File

@ -35,10 +35,9 @@ struct nd_proxy
bool promisc;
};
/* proxy.c */
nd_proxy_t *nd_proxy_create(const char *ifname);
void nd_proxy_handle_ns(nd_proxy_t *proxy, nd_addr_t *src, nd_addr_t *dst, nd_addr_t *tgt, uint8_t *src_ll);
bool nd_proxy_startup();
void nd_proxy_update_all();
#endif // NDPPD_PROXY_H
#endif /* NDPPD_PROXY_H */

View File

@ -44,7 +44,6 @@ struct nd_rtnl_addr
extern long nd_rtnl_dump_timeout;
bool nd_rtnl_open();
void nd_rtnl_cleanup();
bool nd_rtnl_query_addresses();

View File

@ -16,9 +16,9 @@
* You should have received a copy of the GNU General Public License
* along with ndppd. If not, see <https://www.gnu.org/licenses/>.
*/
#include "rule.h"
#include "ndppd.h"
#include "proxy.h"
#include "rule.h"
nd_rule_t *nd_rule_create(nd_proxy_t *proxy)
{

View File

@ -19,6 +19,8 @@
#ifndef NDPPD_RULE_H
#define NDPPD_RULE_H
#include <net/if.h>
#include "ndppd.h"
struct nd_rule
@ -34,7 +36,6 @@ struct nd_rule
bool is_auto;
};
/* rule.c */
nd_rule_t *nd_rule_create(nd_proxy_t *proxy);
#endif // NDPPD_RULE_H
#endif /* NDPPD_RULE_H */

View File

@ -62,4 +62,4 @@ struct nd_session
nd_session_t *nd_alloc_session();
void nd_free_session(nd_session_t *session);
#endif /*NDPPD_SESSION_H*/
#endif /* NDPPD_SESSION_H */

View File

@ -31,7 +31,6 @@ struct nd_sio
nd_sio_handler_t *handler;
};
/* sio.c */
nd_sio_t *nd_sio_open(int domain, int type, int protocol);
void nd_sio_close(nd_sio_t *nio);
bool nd_sio_bind(nd_sio_t *sio, const struct sockaddr *addr, size_t addrlen);