Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull changes from development (08/2022) #49

Draft
wants to merge 120 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
ed56a22
Automatic merge from master -> develop
HRogge Sep 13, 2018
8d70939
Add route_modifier plugin to olsrd2
HRogge Oct 1, 2018
30e39f6
Merge pull request #20 in FKIEA/oonf-os from feature/MOTOR-67-add-rou…
HRogge Oct 1, 2018
a1a4c7e
Fixed scaling factor in methods:
Oct 10, 2018
979fdc7
Merge pull request #21 in FKIEA/oonf-os from bugfix/MOTOR-68-floating…
Oct 10, 2018
a661b23
Fix definition of ethernet multicast groups
HRogge Nov 7, 2018
bd9fe7e
Merge pull request #22 in FKIEA/oonf-os from bugfix/MOTOR-75-fix-comp…
HRogge Nov 7, 2018
37e029c
copy packet socket interface name for os_interface listener
HRogge Nov 7, 2018
62d2a92
Merge pull request #23 in FKIEA/oonf-os from bugfix/OONF-6-copy-packe…
HRogge Nov 7, 2018
b40c949
copy acl configuration from managed stream socket into all sub-sockets
HRogge Nov 9, 2018
e7c3dd7
Merge pull request #24 in FKIEA/oonf-os from bugfix/OONF-7-managed-st…
HRogge Nov 9, 2018
a7904f2
First code revision that does not freeze the netlink sockets in autom…
HRogge Jan 16, 2019
00b20a5
Fix some comment/formatting issues
HRogge Jan 16, 2019
32e76cc
Merge pull request #25 in FKIEA/oonf-os from bugfix/OONF-8-simulate-n…
HRogge Jan 16, 2019
0339b09
keep track of peer addresses in L2 db when cleaning up
HRogge Feb 5, 2019
20aebf8
Merge pull request #26 in FKIEA/oonf-os from bugfix/MOTOR-77-l2-clean…
HRogge Feb 5, 2019
491ee87
Fix type in netjsoninfo route output to match the netjson.org schema
HRogge Mar 13, 2019
95eb6b4
Merge pull request #27 in FKIEA/oonf-os from bugfix/OONF-9-netjsoninf…
HRogge Mar 13, 2019
2f6d196
Add better debugging output for timer values and l2 originators
HRogge Mar 26, 2019
d3735d9
Merge pull request #28 in FKIEA/oonf-os from feature/OONF-10-improve-…
HRogge Mar 26, 2019
2f0b86e
Add support for Netjson LINK command
HRogge Apr 15, 2019
90e8271
Merge pull request #29 in FKIEA/oonf-os from feature/OONF-11-add-netj…
HRogge Apr 15, 2019
506c7b8
Fix data type of netjsoninfo
HRogge Apr 16, 2019
1e3a139
Merge pull request #30 in FKIEA/oonf-os from bugfix/OONF-12-netjsonin…
HRogge Apr 16, 2019
ab24b06
Fix custom netjsoninfo extensions
HRogge Apr 17, 2019
7805711
Merge pull request #31 in FKIEA/oonf-os from bugfix/OONF-12-netjsonin…
HRogge Apr 17, 2019
7cbd134
Simplify netjsoninfo id output
HRogge Apr 17, 2019
1bbb48d
Merge pull request #32 in FKIEA/oonf-os from feature/OONF-13-simplify…
HRogge Apr 17, 2019
bd94012
Add ACL setting to dlep_radio to fix TCP session problem because of w…
HRogge Apr 25, 2019
a0a11ab
Merge pull request #33 in FKIEA/oonf-os from bugfix/OONF-14-add-acl-s…
HRogge Apr 25, 2019
35b3f24
Add IP/Prefix type to layer2 data types and add a DNS interface type …
HRogge May 10, 2019
f96f182
Add DNS based service discovery
HRogge May 10, 2019
045a524
Add doxygen comments
HRogge May 10, 2019
9e14a81
Merge pull request #34 in FKIEA/oonf-os from feature/OONF-15-dns-base…
HRogge May 10, 2019
d2ef771
Add support for small isoprefixes on string parsing
HRogge May 16, 2019
3ef6099
Fix error case for unknown iso prefix
HRogge May 16, 2019
fe0e783
Fix testcase for isoprefix, 'a' is now a valid prefix
HRogge May 16, 2019
628a23c
Merge pull request #36 in FKIEA/oonf-os from bugfix/OONF-16-isonumber…
HRogge May 16, 2019
29d9546
Add better support for prefix filter in layer2 import and layer2 export
HRogge May 22, 2019
7432248
Unify dlep radio and router plugin and add telnet interface
HRogge May 22, 2019
b6566b3
Merge pull request #37 in FKIEA/oonf-os from feature/OONF-17-add-supp…
HRogge May 22, 2019
7537bc3
Add support for sending prefixes from router to radio with session up…
HRogge May 29, 2019
63f0aa1
Merge pull request #38 in FKIEA/oonf-os from feature/OONF-17-add-supp…
HRogge May 29, 2019
79647db
Fix gcc 8.3 release build
HRogge Jun 3, 2019
8844578
Merge pull request #39 in FKIEA/oonf-os from bugfix/OONF-18-fix-dlep-…
HRogge Jun 3, 2019
97d75c4
Continue with next filter-set when one filter of layer2import filter …
HRogge Jun 6, 2019
4bd9cbb
Merge pull request #40 in FKIEA/oonf-os from bugfix/OONF-19-layer2-im…
HRogge Jun 6, 2019
d388913
Forced trigger of metric recalculation listeners
HRogge Jun 7, 2019
c2c2eef
Merge pull request #41 in FKIEA/oonf-os from bugfix/OONF-20-fix-metri…
HRogge Jun 7, 2019
63d36f0
Fix netlink multicast definition system
HRogge Jul 1, 2019
7c3ea0b
Merge pull request #42 in FKIEA/oonf-os from bugfix/OONF-21-netlink-m…
HRogge Jul 1, 2019
6a478c7
fix raw json output for timer entries
HRogge Jul 12, 2019
be1e8c1
Merge pull request #43 in FKIEA/oonf-os from bugfix/OONF-22-fix-raw-j…
HRogge Jul 12, 2019
ee66c72
Add memory guards and class ID to OONF class manager
HRogge Oct 23, 2019
fd78be9
Fix segfault in DLEP extension deactivation
HRogge Jan 21, 2020
d4bc6c6
Merge pull request #44 in FKIEA/oonf-os from bugfix/OONF-24-dlep-cras…
HRogge Jan 21, 2020
ff167f9
Fix DLEP IANA values according to latest registry
HRogge Feb 4, 2020
50d35c6
Merge pull request #45 in FKIEA/oonf-os from bugfix/dlep-iana-registr…
HRogge Feb 14, 2020
226ed49
Add new delayed callback subsystem
HRogge Feb 14, 2020
463cd99
Merge pull request #46 in FKIEA/oonf-os from bugfix/packet-rfc5444-cy…
HRogge Feb 14, 2020
c875bdc
First set of DLEP fixes for clean shutdown
HRogge Feb 14, 2020
8c4aa73
Merge branch 'develop' into bugfix/dlep-shutdown-fixes
HRogge Feb 14, 2020
c1eefb9
Merge pull request #47 in FKIEA/oonf-os from bugfix/dlep-shutdown-fix…
HRogge Feb 17, 2020
8a77bb5
Merge branch 'develop' into feature/OONF-23-add-memory-guards-for-tra…
HRogge Feb 17, 2020
616c718
Merge pull request #48 in FKIEA/oonf-os from feature/OONF-23-add-memo…
HRogge Feb 17, 2020
0d99988
Fix dlep telnet source typo
HRogge Feb 17, 2020
9b133bf
Merge pull request #50 in FKIEA/oonf-os from bugfix/fix-dlep-telnet-t…
HRogge Feb 17, 2020
ae3580d
Fix layer2 access to network default data
HRogge Apr 3, 2020
b6a03c9
Merge pull request #51 in FKIEA/oonf-os from bugfix/fix-layer2-defaul…
HRogge Apr 3, 2020
2e20c85
Add support for DLEP rx/tx frame error rate TLV
HRogge Apr 14, 2020
cca2727
Add partial DLEP code for hopcount extension, hopcontrol still missing
HRogge Apr 14, 2020
4035f4f
fix tx-error rate and add multihop capability to DLEP
HRogge Apr 24, 2020
664fadd
Add packet error rate used size to DLEP/layer2
HRogge May 19, 2020
3c5c7ad
Add logging to olsrv2-l2import
HRogge Jun 24, 2020
a4740a1
Merge pull request #52 in FKIEA/oonf-os from bugfix/olsrv2_l2import-l…
HRogge Jun 24, 2020
67dd799
Sync olsrd2-dlep app plugins with olsrd2 app
HRogge Jun 25, 2020
da645aa
Merge pull request #53 in FKIEA/oonf-os from bugfix/update-olsrd2-dle…
HRogge Jun 25, 2020
942043c
Merge branch 'develop' into feature/Add-dlep-error-rate
HRogge Jun 26, 2020
f571665
Merge pull request #54 in FKIEA/oonf-os from feature/Add-dlep-error-r…
HRogge Jul 16, 2020
8127855
Allow routing tables up to 65535
HRogge Aug 13, 2020
d27bd2d
Merge pull request #55 in FKIEA/oonf-os from feature/increase-table-l…
HRogge Aug 13, 2020
927a77d
Add support for 32 bit routing tables in netlink code
HRogge Aug 13, 2020
5e6e9b2
Merge pull request #56 in FKIEA/oonf-os from feature/netlink-large-ta…
HRogge Aug 13, 2020
61ed1de
Add type 'all' to lan-import
HRogge Aug 27, 2020
c3caf21
Merge pull request #57 in FKIEA/oonf-os from feature/add-capture-all-…
HRogge Aug 27, 2020
253d4aa
Return exit code zero if the user uses --quit and nothing goes wrong
HRogge Aug 27, 2020
c0cbef6
Merge pull request #58 in FKIEA/oonf-os from feature/return-zero-from…
HRogge Aug 27, 2020
d678d3f
Add olsrv2info local telnet command
HRogge Sep 3, 2020
a313c5e
Merge pull request #59 in FKIEA/oonf-os from feature/add-olsrv2info-l…
HRogge Sep 3, 2020
4f8ae01
Fix triggering dijkstra when receiving LAN updates
HRogge Sep 3, 2020
607f967
Merge pull request #60 in FKIEA/oonf-os from bugfix/fix-olsrv2-lan-ha…
HRogge Sep 3, 2020
e5758c5
Allow import routing tables with a block of a specific protocol
HRogge Sep 7, 2020
0e138d7
Merge pull request #61 in FKIEA/oonf-os from feature/l2import-block-p…
HRogge Sep 7, 2020
49abf56
Add block_protocol to lan_import
HRogge Sep 7, 2020
eefb043
Merge pull request #62 in FKIEA/oonf-os from feature/l2import-block-p…
HRogge Sep 7, 2020
815b99d
Add l2net import feature
HRogge Sep 8, 2020
644df45
Merge pull request #63 in FKIEA/oonf-os from feature/l2import_l2net t…
HRogge Sep 8, 2020
c779869
Remove layer2 data on DLEP session teardown
HRogge Sep 14, 2020
c370810
Merge pull request #64 in FKIEA/oonf-os from bugfix/remove-l2-on-dlep…
HRogge Sep 14, 2020
b55f36d
Add json based import/export plugin for layer2 library
HRogge Sep 23, 2020
06b8343
Merge pull request #65 in FKIEA/oonf-os from feature/l2json to develop
HRogge Sep 23, 2020
e1e49c0
ANSN Check must be skipped if we reset the sequence number of a router
HRogge Jun 11, 2021
694a196
Merge pull request #66 in FKIEA/oonf-os from bugfix/fix_ansn_check to…
HRogge Jun 11, 2021
238c253
revert commit e1e49c0496be459f93e1508ff068ae5018622253
HRogge Jun 11, 2021
1904ed9
Merge pull request #67 in FKIEA/oonf-os from revert-bugfix to develop
HRogge Jun 11, 2021
7965956
Allow double-slash prefix for auto-quit telnet commands without comma…
HRogge Aug 18, 2021
bc4d842
Merge pull request #68 in FKIEA/oonf-os from feature/double-slash-tel…
HRogge Aug 18, 2021
6df2af0
Add atomic replacement for origin to l2json import
HRogge Aug 18, 2021
6980287
Merge pull request #69 in FKIEA/oonf-os from feature/l2import-replace…
HRogge Aug 18, 2021
fc1ee64
Fix some errors (most likely GCC changes) and disable DNS plugins for…
HRogge Sep 28, 2021
88eb288
Pull request #72: Fix some errors (most likely GCC changes) and disab…
HRogge Sep 28, 2021
919aea8
ignore not yet implemented TLV 20
JeremiasHo Oct 22, 2021
9090034
peer update fix for MTU TLV
JeremiasHo Oct 22, 2021
8571f73
Merge pull request #35 from JeremiasHo/patch-1
mathiashro Aug 25, 2022
1cec9b2
Merge pull request #36 from JeremiasHo/patch-2
mathiashro Aug 25, 2022
3d60692
Fix #41: Use correct interface for establishing DLEP TCP session
XDjackieXD Feb 5, 2023
04b2c9a
Fix openwrt buildscript plugins
XDjackieXD Feb 5, 2023
fbea183
Fix lan_import plugin build
XDjackieXD Mar 6, 2023
571afe7
Merge pull request #62 from XDjackieXD/fix_lan_import_build
mathiashro Nov 6, 2023
a82ecdb
Merge pull request #55 from XDjackieXD/develop
mathiashro Nov 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
First code revision that does not freeze the netlink sockets in autom…
…atic test setup
HRogge committed Jan 16, 2019
commit a7904f2ee6365745060fc0e57812a5a1aac9ea8a
2 changes: 1 addition & 1 deletion include/oonf/base/oonf_class.h
Original file line number Diff line number Diff line change
@@ -46,8 +46,8 @@
#ifndef _OONF_CLASS_H
#define _OONF_CLASS_H

#include <oonf/libcommon/avl.h>
#include <oonf/oonf.h>
#include <oonf/libcommon/avl.h>
#include <oonf/libcommon/list.h>

/*! subsystem identifier */
2 changes: 1 addition & 1 deletion include/oonf/base/oonf_duplicate_set.h
Original file line number Diff line number Diff line change
@@ -46,8 +46,8 @@
#ifndef OONF_DUPLICATE_SET_H_
#define OONF_DUPLICATE_SET_H_

#include <oonf/libcommon/avl.h>
#include <oonf/oonf.h>
#include <oonf/libcommon/avl.h>
#include <oonf/libcommon/netaddr.h>
#include <oonf/base/oonf_timer.h>

2 changes: 1 addition & 1 deletion include/oonf/base/oonf_http.h
Original file line number Diff line number Diff line change
@@ -46,8 +46,8 @@
#ifndef OONF_HTTP_H_
#define OONF_HTTP_H_

#include <oonf/libcommon/avl.h>
#include <oonf/oonf.h>
#include <oonf/libcommon/avl.h>
#include <oonf/libcommon/netaddr.h>
#include <oonf/libcommon/netaddr_acl.h>
#include <oonf/libcommon/string.h>
2 changes: 1 addition & 1 deletion include/oonf/base/oonf_layer2.h
Original file line number Diff line number Diff line change
@@ -46,8 +46,8 @@
#ifndef OONF_LAYER2_H_
#define OONF_LAYER2_H_

#include <oonf/libcommon/avl.h>
#include <oonf/oonf.h>
#include <oonf/libcommon/avl.h>
#include <oonf/libcore/oonf_subsystem.h>
#include <oonf/base/os_interface.h>

2 changes: 1 addition & 1 deletion include/oonf/base/oonf_packet_socket.h
Original file line number Diff line number Diff line change
@@ -46,8 +46,8 @@
#ifndef OONF_PACKET_SOCKET_H_
#define OONF_PACKET_SOCKET_H_

#include <oonf/libcommon/autobuf.h>
#include <oonf/oonf.h>
#include <oonf/libcommon/autobuf.h>
#include <oonf/libcommon/list.h>
#include <oonf/libcommon/netaddr.h>
#include <oonf/libcommon/netaddr_acl.h>
2 changes: 1 addition & 1 deletion include/oonf/base/oonf_rfc5444.h
Original file line number Diff line number Diff line change
@@ -46,8 +46,8 @@
#ifndef OONF_RFC5444_H_
#define OONF_RFC5444_H_

#include <oonf/libcommon/avl.h>
#include <oonf/oonf.h>
#include <oonf/libcommon/avl.h>
#include <oonf/libcommon/netaddr.h>
#include <oonf/base/oonf_duplicate_set.h>
#include <oonf/base/oonf_packet_socket.h>
37 changes: 4 additions & 33 deletions include/oonf/base/oonf_socket.h
Original file line number Diff line number Diff line change
@@ -46,47 +46,18 @@
#ifndef OONF_SOCKET_H_
#define OONF_SOCKET_H_

#include <oonf/libcommon/avl.h>
struct oonf_socket_entry;

#include <oonf/oonf.h>
#include <oonf/libcommon/avl.h>
#include <oonf/libcommon/list.h>
#include <oonf/libcommon/netaddr_acl.h>
#include <oonf/base/os_fd.h>
#include <oonf/base/oonf_socket_data.h>

/*! subsystem identifier */
#define OONF_SOCKET_SUBSYSTEM "socket"

/**
* registered socket handler
*/
struct oonf_socket_entry {
/*! name of socket handler */
const char *name;

/*! file descriptor of the socket */
struct os_fd fd;

/**
* Callback when read or write event happens to socket
* @param fd file descriptor of socket
*/
void (*process)(struct oonf_socket_entry *entry);

/*! usage counter, will be increased every times the socket receives data */
uint32_t _stat_recv;

/*! usage counter, will be increased every times the socket sends data */
uint32_t _stat_send;

/*!
* usage counter, will be increased every times a socket processing takes
* more than a TIMER slice
*/
uint32_t _stat_long;

/*! list of socket handlers */
struct list_entity _node;
};

EXPORT void oonf_socket_add(struct oonf_socket_entry *);
EXPORT void oonf_socket_remove(struct oonf_socket_entry *);
EXPORT void oonf_socket_set_read(struct oonf_socket_entry *entry, bool event_read);
87 changes: 87 additions & 0 deletions include/oonf/base/oonf_socket_data.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@

/*
* The olsr.org Optimized Link-State Routing daemon version 2 (olsrd2)
* Copyright (c) 2004-2015, the olsr.org team - see HISTORY file
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of olsr.org, olsrd nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Visit http://www.olsr.org for more information.
*
* If you find this software useful feel free to make a donation
* to the project. For more information see the website or contact
* the copyright holders.
*
*/

/**
* @file
*/

#ifndef OONF_SOCKET_DATA_H_
#define OONF_SOCKET_DATA_H_

struct oonf_socket_entry;

#include <oonf/oonf.h>
#include <oonf/libcommon/list.h>
#include <oonf/base/os_fd_data.h>

/**
* registered socket handler
*/
struct oonf_socket_entry {
/*! name of socket handler */
const char *name;

/*! file descriptor of the socket */
struct os_fd fd;

/**
* Callback when read or write event happens to socket
* @param fd file descriptor of socket
*/
void (*process)(struct oonf_socket_entry *entry);

/*! usage counter, will be increased every times the socket receives data */
uint32_t _stat_recv;

/*! usage counter, will be increased every times the socket sends data */
uint32_t _stat_send;

/*!
* usage counter, will be increased every times a socket processing takes
* more than a TIMER slice
*/
uint32_t _stat_long;

/*! list of socket handlers */
struct list_entity _node;
};

#endif /* OONF_SOCKET_DATA_H_ */
2 changes: 1 addition & 1 deletion include/oonf/base/oonf_stream_socket.h
Original file line number Diff line number Diff line change
@@ -46,8 +46,8 @@
#ifndef OONF_STREAM_SOCKET_H_
#define OONF_STREAM_SOCKET_H_

#include <oonf/libcommon/autobuf.h>
#include <oonf/oonf.h>
#include <oonf/libcommon/autobuf.h>
#include <oonf/libcommon/list.h>
#include <oonf/libcommon/netaddr.h>
#include <oonf/libcommon/netaddr_acl.h>
12 changes: 7 additions & 5 deletions include/oonf/base/os_clock.h
Original file line number Diff line number Diff line change
@@ -56,11 +56,7 @@
#define OONF_OS_CLOCK_SUBSYSTEM "os_clock"

#if defined(__linux__)
#include <oonf/base/os_linux/os_clock_linux.h>
#elif defined(BSD)
#include <oonf/base/os_bsd/os_clock_bsd.h>
#elif defined(_WIN32)
#include <oonf/base/os_win32/os_clock_win32.h>
#include <oonf/base/os_linux/os_clock_linux_data.h>
#else
#error "Unknown operation system"
#endif
@@ -69,4 +65,10 @@
static INLINE int os_clock_gettime64_ns(uint64_t *t64);
static INLINE int os_clock_gettime64(uint64_t *t64);

#if defined(__linux__)
#include <oonf/base/os_linux/os_clock_linux.h>
#else
#error "Unknown operation system"
#endif

#endif /* OS_CLOCK_H_ */
25 changes: 17 additions & 8 deletions include/oonf/base/os_fd.h
Original file line number Diff line number Diff line change
@@ -46,6 +46,12 @@
#ifndef OS_FD_H_
#define OS_FD_H_

#if 0
/* pre-definition of structs */
struct os_fd;
struct os_fd_select;
#endif

#include <sys/select.h>
#include <unistd.h>

@@ -57,13 +63,20 @@
#include <oonf/base/oonf_timer.h>
#include <oonf/base/os_interface.h>

#include <oonf/base/os_fd_data.h>

#if 0
/* include os-specific headers */
#if defined(__linux__)
#include <oonf/base/os_linux/os_fd_linux_data.h>
#elif defined(BSD)
#error "Unknown operation system"
#endif
#endif

/*! subsystem identifier */
#define OONF_OS_FD_SUBSYSTEM "os_fd"

/* pre-definition of structs */
struct os_fd;
struct os_fd_select;

/* pre-declare inlines */
static INLINE int os_fd_init(struct os_fd *, int fd);
static INLINE int os_fd_copy(struct os_fd *dst, struct os_fd *from);
@@ -116,10 +129,6 @@ static INLINE uint8_t *os_fd_skip_rawsocket_prefix(uint8_t *ptr, ssize_t *len, i
#if defined(__linux__)
#include <oonf/base/os_linux/os_fd_linux.h>
#elif defined(BSD)
#include <oonf/base/os_bsd/os_fd_bsd.h>
#elif defined(_WIN32)
#include <oonf/base/os_win32/os_fd_win32.h>
#else
#error "Unknown operation system"
#endif

60 changes: 60 additions & 0 deletions include/oonf/base/os_fd_data.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@

/*
* The olsr.org Optimized Link-State Routing daemon version 2 (olsrd2)
* Copyright (c) 2004-2015, the olsr.org team - see HISTORY file
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of olsr.org, olsrd nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Visit http://www.olsr.org for more information.
*
* If you find this software useful feel free to make a donation
* to the project. For more information see the website or contact
* the copyright holders.
*
*/

/**
* @file
*/

#ifndef OS_FD_DATA_H_
#define OS_FD_DATA_H_

/* pre-definition of structs */
struct os_fd;
struct os_fd_select;

/* include os-specific headers */
#if defined(__linux__)
#include <oonf/base/os_linux/os_fd_linux_data.h>
#elif defined(BSD)
#error "Unknown operation system"
#endif

#endif /* OS_FD_DATA_H_ */
Loading