Codebase list lldpd / 5fcddf4
Imported Upstream version 0.7.7 Vincent Bernat 10 years ago
66 changed file(s) with 3837 addition(s) and 1606 deletion(s). Raw diff Collapse all Expand all
0 0.7.6
0 0.7.7
0 0.7.7 [2013-11-10 15:42:52 +0100]:
1
2 - [d72c2c591fb6] release: prepare for release of 0.7.7 (Vincent Bernat)
3 - [3a9dc9c133f5] lldpd: tell `lldpcli` to use the appropriate control socket (Vincent Bernat)
4 - [f7242beb1ef8] lldpcli: accepts `-u` option to specify control socket (Vincent Bernat)
5 - [b6312220edf5] privsep: put /etc/localtime in chroot (Vincent Bernat)
6 - [4006b64e3a92] systemd: also read /etc/sysconfig/lldpd (Vincent Bernat)
7 - [ff4d7fa9c7ef] systemd: require mount points to have chroot possible (Vincent Bernat)
8 - [25f47deab82c] systemd: starts lldpd after network (Vincent Bernat)
9 - [c2e68bff3dda] tests: only test if we have `check` installed (Vincent Bernat)
10 - [246701fe22bd] seccomp: do not ship `syscall-names.h` (Vincent Bernat)
11 - [6a427fb18c67] travis: don't limit tests to master branch. (Vincent Bernat)
12 - [4e97a0bf8488] lib: fix a segfault introduced in ef3707 when freeing an atom (Vincent Bernat)
13 - [00e40dba232c] seccomp: add support for seccomp through libseccomp (Vincent Bernat)
14 - [bde52887c7f4] systemd: use full path for mkdir/cp (Vincent Bernat)
15 - [140e34f05746] systemtap: provide an appropriate tapset (Vincent Bernat)
16 - [bdfe41938907] dtrace: add systemtap/DTrace support (Vincent Bernat)
17 - [5f7d1cd51fe9] README: explain how to handle VLAN-encapsulated LLDP frames (Vincent Bernat)
18 - [f17837f781b0] configure: use a convenience library for fixed point arithmetic (Vincent Bernat)
19 - [c0cdd0111f3f] Revert "README: remove inexact paragraph about stacking bonding/vlans/bridges" (Vincent Bernat)
20 - [12baf7811f63] linux: fix a regression in how enslaved devices' MAC addresses are retrieved (Vincent Bernat)
21 - [dbcb684662e2] event: don't call `netsnmp_check_outstanding_agent_requests()` (Vincent Bernat)
22 - [9a4e257b0ad1] priv: use unistd.h to get `close()` (Vincent Bernat)
23 - [4565704cef06] configure: remove an extra parenthesis in args.m4 (Vincent Bernat)
24 - [4dfe31fd72ad] systemd: install service file using `systemdsystemunit_DATA` (Vincent Bernat)
25 - [bdc954b77ada] lib: fix notification by reading one byte at a time from Unix socket (Vincent Bernat)
26 - [9d1524b7de1c] systemd: ship lldpd.service file if possible (Vincent Bernat)
27 - [41e57d5a8821] lldpd: fix a segfault when a port disappear (Vincent Bernat)
28 - [42ea638d61b5] lldpd: small optimization in the expiration process (Vincent Bernat)
29 - [ef3707dacfd9] lldpd: make notifications work when a port goes down (Vincent Bernat)
30 - [f5a0a15ea37d] linux: add support for team devices (Vincent Bernat)
31 - [5813918ade1b] rpc: don't check source MAC settings when it is 0 (Vincent Bernat)
32 - [7d758eec2bf7] interfaces: mangle source MAC address on bonds for other OS too (Vincent Bernat)
33 - [5347914ef1fc] interfaces: abstract a bit MAC address mangling for bonding devices (Vincent Bernat)
34 - [99704cd9b9ff] interfaces: move "mangle" function for bond slaves (Vincent Bernat)
35 - [bae18e13c284] lldpcli: remove unused variable (Vincent Bernat)
36 - [d7166588be78] lib: update version-info to match previous changes (Vincent Bernat)
37 - [2746d430fbcc] bond: reenable the possibility to use a fixed MAC address (Vincent Bernat)
38 - [c9703b9640ac] client: move register of bond-slave-src-mac-type to a separate function (Vincent Bernat)
39 - [dfbd7185f823] [PATCH| lldpd: use bond slave real mac with locally administered bit set as sour ce man in lldp frames sent on bond slaves (Roopa Prabhu)
40 - [87bc6683c602] linux: mangle MAC address for enslaved devices (Vincent Bernat)
41 - [96f2411a2bbf] lib: fix parsing of "11542." (Vincent Bernat)
42 - [f730f6c5f648] lib: introduce proper fixed point parsing and representation module (Vincent Bernat)
43 - [d2c04230fb3a] lib: correctly set altitude unit without erasing neighbouring data (Vincent Bernat)
44 - [bec75f842fa4] event: replace `evutil_make_socket_nonblocking()` by an idempotent version (Vincent Bernat)
45 - [1e0d651f6ec9] lldpd: invoke `setproctitle_init()` when needed (Vincent Bernat)
46 - [5c4fa9bdc202] priv: use `sigaction()` instead of `signal()` to install non-default signals (Vincent Bernat)
47 - [82fcdf156dd2] README: on OSX, /etc is a symlink to /private/etc. (Vincent Bernat)
48 - [c3f855602d84] osx: make the path to /Library/LaunchDaemons configurable (Vincent Bernat)
49 - [352897291cc5] osx: minimize differences with downstream Homebrew formula (Vincent Bernat)
50 - [6ed2b9ad9b4f] osx: fix a syntax error in Homebrew formula (Vincent Bernat)
51 - [91a63c540e59] osx: patch the installation of launchd plist file for Homebrew (Vincent Bernat)
52 - [53c56a7a0fef] osx: don't remove the whole /Library/LaunchDaemons directory on uninstall! (Vincent Bernat)
53 - [d0a033727caa] configure: check for `res_init()` before trying other forms. (Vincent Bernat)
54 - [ba09084d4764] README: remove inexact paragraph about stacking bonding/vlans/bridges (Vincent Bernat)
55 - [25354cf35113] osx: update SHA1 sum for Homebrew recipe (Vincent Bernat)
56
057 0.7.6 [2013-07-12 10:00:01 +0200]:
158
2 - [09587df] osx: fix postinstall script (Vincent Bernat)
3 - [3336988] packaging: change `PreReq` to `Requires(pre)` in lldpd.spec (Vincent Bernat)
4 - [03b0a19] packaging: update to 0.7.6 (Vincent Bernat)
5 - [22f1ea4] README: show how to use tcpdump for troubleshooting (Vincent Bernat)
6 - [065732c] priv: correctly declare `priv_cmd` type (Vincent Bernat)
7 - [bcde9c0] doc: add a CONTRIBUTE document (Vincent Bernat)
8 - [fef34de] linux: define IFALIASZ for old systems (Vincent Bernat)
9 - [3a72338] lldpd: fix a fd leak when we cannot write the new alias (Vincent Bernat)
10 - [015ecdd] lldpd: append "was" to an interface description when a neighbor disappear (Vincent Bernat)
11 - [bb37268] client: add "configure/unconfigure system interface description" command (Vincent Bernat)
12 - [2de0949] lib: `lldpctl_k_config_receiveonly` is a read-only property (Vincent Bernat)
13 - [47820fc] interfaces: overwrite interface description with neighbor found (Vincent Bernat)
14 - [53d4577] priv: avoid to leak generic socket (Vincent Bernat)
15 - [4ea0565] privsep: separate OS specific code to dedicated files (Vincent Bernat)
16 - [784077f] redhat: require groupadd/useradd (Vincent Bernat)
17 - [31e4e7c] osx: don't repeat `pkg-ref` several times in `distribution.xml` (Vincent Bernat)
18 - [4c4e1ae] osx: don't use `domains` tag in `distribution.xml` (Vincent Bernat)
19 - [462d8b6] osx: add a way to compile for older versions of OS X (Vincent Bernat)
20 - [fa71a00] osx: `make pkg` can now build universal binaries (Vincent Bernat)
21 - [5b90c4f] osx: don't try to build universal binaries (Vincent Bernat)
22 - [4249412] configure: remove out-dated instructions to regen autoconf out-of-git (Vincent Bernat)
23 - [5e36732] snmp: fix a typo in `agent_priv.c` (Vincent Bernat)
24 - [e9f4d63] configure: ensure that osx/scripts are executable (Vincent Bernat)
25 - [7298e28] osx: use HTML files instead of RTF for welcome message (Vincent Bernat)
26 - [92f5db0] osx: simpler instructions in README.md (Vincent Bernat)
27 - [b708297] osx: add a target to build an OSX package (Vincent Bernat)
28 - [abacd8d] configure: fix a typo in the description of `--with-embedded-libevent` option (Vincent Bernat)
29 - [e37255a] travis: check that we can build lldpd with embedded libevent (Vincent Bernat)
30 - [f829eff] configure: add a flag to force use of embedded libevent (Vincent Bernat)
31 - [eea17f7] debian: update packaging to match downstream (Vincent Bernat)
32 - [edc437d] compat: include config.h in compat.h (Vincent Bernat)
33 - [2817898] compat: fix strndup (Vincent Bernat)
34 - [2523da3] NEWS: add an entry about the use of `strndup()` (Vincent Bernat)
35 - [7354ec8] compat: add `strndup()` compatibility function (Vincent Bernat)
36 - [d52cf1d] compat: remove copyright notice for setproctitle() (Vincent Bernat)
37 - [c6540ec] tests: define ck_assert_ptr_eq if check is too old (Vincent Bernat)
38 - [46a402c] osx: use SHA1 instead of MD5 in homebrew formula (Vincent Bernat)
39 - [1e8952d] check: use `ck_assert_ptr_eq` instead of `ck_assert_int_eq`. (Vincent Bernat)
40 - [b0cb07f] style: use C99 designated initializers instead of memset() when possible (Vincent Bernat)
41 - [444c686] packaging: update to 0.7.5 (Vincent Bernat)
59 - [09587df0ed71] osx: fix postinstall script (Vincent Bernat)
60 - [3336988a6ccd] packaging: change `PreReq` to `Requires(pre)` in lldpd.spec (Vincent Bernat)
61 - [03b0a19012f9] packaging: update to 0.7.6 (Vincent Bernat)
62 - [22f1ea467ef9] README: show how to use tcpdump for troubleshooting (Vincent Bernat)
63 - [065732ca3413] priv: correctly declare `priv_cmd` type (Vincent Bernat)
64 - [bcde9c0aa535] doc: add a CONTRIBUTE document (Vincent Bernat)
65 - [fef34dede19b] linux: define IFALIASZ for old systems (Vincent Bernat)
66 - [3a723384557d] lldpd: fix a fd leak when we cannot write the new alias (Vincent Bernat)
67 - [015ecdd5f6ac] lldpd: append "was" to an interface description when a neighbor disappear (Vincent Bernat)
68 - [bb37268d812b] client: add "configure/unconfigure system interface description" command (Vincent Bernat)
69 - [2de09499f87f] lib: `lldpctl_k_config_receiveonly` is a read-only property (Vincent Bernat)
70 - [47820fc416cc] interfaces: overwrite interface description with neighbor found (Vincent Bernat)
71 - [53d4577a63fd] priv: avoid to leak generic socket (Vincent Bernat)
72 - [4ea0565ebd7c] privsep: separate OS specific code to dedicated files (Vincent Bernat)
73 - [784077f8b096] redhat: require groupadd/useradd (Vincent Bernat)
74 - [31e4e7c6205f] osx: don't repeat `pkg-ref` several times in `distribution.xml` (Vincent Bernat)
75 - [4c4e1aef7a51] osx: don't use `domains` tag in `distribution.xml` (Vincent Bernat)
76 - [462d8b6c813a] osx: add a way to compile for older versions of OS X (Vincent Bernat)
77 - [fa71a00c8b1a] osx: `make pkg` can now build universal binaries (Vincent Bernat)
78 - [5b90c4f5c054] osx: don't try to build universal binaries (Vincent Bernat)
79 - [42494121e890] configure: remove out-dated instructions to regen autoconf out-of-git (Vincent Bernat)
80 - [5e36732de776] snmp: fix a typo in `agent_priv.c` (Vincent Bernat)
81 - [e9f4d63c9efa] configure: ensure that osx/scripts are executable (Vincent Bernat)
82 - [7298e28fad13] osx: use HTML files instead of RTF for welcome message (Vincent Bernat)
83 - [92f5db08c399] osx: simpler instructions in README.md (Vincent Bernat)
84 - [b708297cbab9] osx: add a target to build an OSX package (Vincent Bernat)
85 - [abacd8d20f8c] configure: fix a typo in the description of `--with-embedded-libevent` option (Vincent Bernat)
86 - [e37255a58218] travis: check that we can build lldpd with embedded libevent (Vincent Bernat)
87 - [f829effd3fe8] configure: add a flag to force use of embedded libevent (Vincent Bernat)
88 - [eea17f742927] debian: update packaging to match downstream (Vincent Bernat)
89 - [edc437d94f56] compat: include config.h in compat.h (Vincent Bernat)
90 - [28178982aa65] compat: fix strndup (Vincent Bernat)
91 - [2523da3af610] NEWS: add an entry about the use of `strndup()` (Vincent Bernat)
92 - [7354ec8f2bd0] compat: add `strndup()` compatibility function (Vincent Bernat)
93 - [d52cf1d2729f] compat: remove copyright notice for setproctitle() (Vincent Bernat)
94 - [c6540ece3ea7] tests: define ck_assert_ptr_eq if check is too old (Vincent Bernat)
95 - [46a402c55b96] osx: use SHA1 instead of MD5 in homebrew formula (Vincent Bernat)
96 - [1e8952da6db7] check: use `ck_assert_ptr_eq` instead of `ck_assert_int_eq`. (Vincent Bernat)
97 - [b0cb07f7ed0b] style: use C99 designated initializers instead of memset() when possible (Vincent Bernat)
98 - [444c6862d096] packaging: update to 0.7.5 (Vincent Bernat)
4299
43100 0.7.5 [2013-06-22 13:57:31 +0200]:
44101
45 - [2169efb] tokenizer: input buffer was too small (Vincent Bernat)
46 - [6712d3e] packaging: update packaging (Vincent Bernat)
102 - [2169efb24f0a] tokenizer: input buffer was too small (Vincent Bernat)
103 - [6712d3ec1409] packaging: update packaging (Vincent Bernat)
47104
48105 0.7.4 [2013-06-22 12:15:47 +0200]:
49106
50 - [1381217] bpf: on OpenBSD, invert the filter direction (Vincent Bernat)
51 - [96b97fa] NEWS: add an entry for the use of `setproctitle()` (Vincent Bernat)
52 - [f0d2157] compat: declare `setproctitle()` as a printf function (Vincent Bernat)
53 - [19ce813] debian: build-depends on libbssd-dev (Vincent Bernat)
54 - [e7103af] lldpd: when no `setproctitle()` available, don't count neighbors (Vincent Bernat)
55 - [480f1c6] lldpd: count number of chassis to get number of neighbors (Vincent Bernat)
56 - [25eb187] lldpd: don't call `lldpd_count_neighbors()` too many times (Vincent Bernat)
57 - [66879d4] build: use libbsd if available, also use `setproctitle()` (Vincent Bernat)
58 - [3f70e11] lldpcli: `configure system platform` to override platform description (Vincent Bernat)
59 - [decaec0] lldpcli: `configure system description` to override chassis description (Vincent Bernat)
60 - [994b337] lldpcli: split `conf.c` into `conf-system.c` and `conf-lldp.c`. (Vincent Bernat)
61 - [48d0a4b] lldpcli: `configure system interface pattern` instead of `configure lldp iface-pattern` (Vincent Bernat)
62 - [a3e0896] libevent: use GitHub git tree (Vincent Bernat)
63 - [c11e397] debian: sync packaging with official Debian package (Vincent Bernat)
64 - [e39f079] libevent: switch to patches-2.0 branch to get the appropriate automake fix (Vincent Bernat)
65 - [8677ddc] git: ignore test-driver, generated by recent automake versions (Vincent Bernat)
66 - [bea0d76] Fixed some boundary conditions in code that cleans remote ports on ttl expiry. (Roopa Prabhu)
67 - [5aeda65] liblldpctl: fix infinite loop when user is reading fixed chunks (Pradosh Mohapatra)
68 - [d823429] marshal: fix alignment issue when unserializing (Vincent Bernat)
69 - [bea7031] log: fix memory leak when using a log handler (Vincent Bernat)
70 - [a8da186] marshal: don't declare serialize/unserialize helper for string (Vincent Bernat)
71 - [02cf035] lldpd: fix an alignment (non-)issue (Vincent Bernat)
72 - [bd8a886] lldpcli: don't use an hack to pass the writer to watch callback (Vincent Bernat)
73 - [985a4cb] marshal: provide type-specific serialization/unserialization functions (Vincent Bernat)
74 - [aba549a] client: fix a memory leak when changing lldpd configuration (Vincent Bernat)
75 - [93afd29] ctl: fix a memory leak when cleaning control socket (Vincent Bernat)
76 - [e681c85] client: trigger interface refresh when updating interface pattern (Vincent Bernat)
77 - [e26a25c] lib: fix a memory leak when modifying interface pattern (Vincent Bernat)
78 - [0093777] lldpcli: document "configure lldp iface-pattern" in manual page (Vincent Bernat)
79 - [7e516f1] lldpctl.h: document possibility to write iface-pattern (Vincent Bernat)
80 - [346a0f6] lldpcli: Add support to set iface-pattern (roopa)
81 - [0728cb8] sonmp: allow SONMP unittests to work without a global config (Vincent Bernat)
82 - [ea481e3] man: document tx-hold (Vincent Bernat)
83 - [cb5f739] man: tx-interval cannot be set per port (Vincent Bernat)
84 - [c10302a] lldpd: Add tx_hold (roopa)
85 - [5920dbf] lldpcli: don't rely on `fgetln()` providing a NULL-terminated string (Vincent Bernat)
86 - [655145c] lldpcli: don't free input line (Vincent Bernat)
87 - [d1dc456] lib: keep space for new values in `lldpctl_key_t` (Vincent Bernat)
88 - [40116b4] debian: synchronize packaging with Debian (Vincent Bernat)
89 - [e91ca9d] release: prepare 0.7.3 (Vincent Bernat)
107 - [138121782171] bpf: on OpenBSD, invert the filter direction (Vincent Bernat)
108 - [96b97fac65bb] NEWS: add an entry for the use of `setproctitle()` (Vincent Bernat)
109 - [f0d215766ac0] compat: declare `setproctitle()` as a printf function (Vincent Bernat)
110 - [19ce8130c7f1] debian: build-depends on libbssd-dev (Vincent Bernat)
111 - [e7103aff39e2] lldpd: when no `setproctitle()` available, don't count neighbors (Vincent Bernat)
112 - [480f1c6130ef] lldpd: count number of chassis to get number of neighbors (Vincent Bernat)
113 - [25eb1871461a] lldpd: don't call `lldpd_count_neighbors()` too many times (Vincent Bernat)
114 - [66879d46ac2b] build: use libbsd if available, also use `setproctitle()` (Vincent Bernat)
115 - [3f70e1182aeb] lldpcli: `configure system platform` to override platform description (Vincent Bernat)
116 - [decaec0d8a67] lldpcli: `configure system description` to override chassis description (Vincent Bernat)
117 - [994b3371b3b0] lldpcli: split `conf.c` into `conf-system.c` and `conf-lldp.c`. (Vincent Bernat)
118 - [48d0a4b0d72e] lldpcli: `configure system interface pattern` instead of `configure lldp iface-pattern` (Vincent Bernat)
119 - [a3e0896768d4] libevent: use GitHub git tree (Vincent Bernat)
120 - [c11e397a7598] debian: sync packaging with official Debian package (Vincent Bernat)
121 - [e39f079a1558] libevent: switch to patches-2.0 branch to get the appropriate automake fix (Vincent Bernat)
122 - [8677ddc78172] git: ignore test-driver, generated by recent automake versions (Vincent Bernat)
123 - [bea0d76429a2] Fixed some boundary conditions in code that cleans remote ports on ttl expiry. (Roopa Prabhu)
124 - [5aeda65433fd] liblldpctl: fix infinite loop when user is reading fixed chunks (Pradosh Mohapatra)
125 - [d82342940c39] marshal: fix alignment issue when unserializing (Vincent Bernat)
126 - [bea703140788] log: fix memory leak when using a log handler (Vincent Bernat)
127 - [a8da18644b17] marshal: don't declare serialize/unserialize helper for string (Vincent Bernat)
128 - [02cf0357c916] lldpd: fix an alignment (non-)issue (Vincent Bernat)
129 - [bd8a8861df79] lldpcli: don't use an hack to pass the writer to watch callback (Vincent Bernat)
130 - [985a4cb5f210] marshal: provide type-specific serialization/unserialization functions (Vincent Bernat)
131 - [aba549a82a0f] client: fix a memory leak when changing lldpd configuration (Vincent Bernat)
132 - [93afd294af9b] ctl: fix a memory leak when cleaning control socket (Vincent Bernat)
133 - [e681c859c6c9] client: trigger interface refresh when updating interface pattern (Vincent Bernat)
134 - [e26a25ca4d0e] lib: fix a memory leak when modifying interface pattern (Vincent Bernat)
135 - [0093777b2894] lldpcli: document "configure lldp iface-pattern" in manual page (Vincent Bernat)
136 - [7e516f104a85] lldpctl.h: document possibility to write iface-pattern (Vincent Bernat)
137 - [346a0f6961ba] lldpcli: Add support to set iface-pattern (roopa)
138 - [0728cb8205f7] sonmp: allow SONMP unittests to work without a global config (Vincent Bernat)
139 - [ea481e370199] man: document tx-hold (Vincent Bernat)
140 - [cb5f7399a79f] man: tx-interval cannot be set per port (Vincent Bernat)
141 - [c10302a38ece] lldpd: Add tx_hold (roopa)
142 - [5920dbf73ae1] lldpcli: don't rely on `fgetln()` providing a NULL-terminated string (Vincent Bernat)
143 - [655145c07b89] lldpcli: don't free input line (Vincent Bernat)
144 - [d1dc456f990f] lib: keep space for new values in `lldpctl_key_t` (Vincent Bernat)
145 - [40116b407603] debian: synchronize packaging with Debian (Vincent Bernat)
146 - [e91ca9d0157c] release: prepare 0.7.3 (Vincent Bernat)
90147
91148 0.7.3 [2013-05-09 00:05:36 +0200]:
92149
93 - [a1728b7] NEWS: add a word about Solaris support (Vincent Bernat)
94 - [b1a8985] solaris: less intrusive way to get CMSG_* macros (Vincent Bernat)
95 - [815b799] solaris: assume that IP forwarding is disabled (Vincent Bernat)
96 - [c3e340b] solaris: preliminary support (Vincent Bernat)
97 - [d0787f4] NEWS: add an entry about LLDP-MED fast start. (Vincent Bernat)
98 - [486a613] lldpcli: allow to enable/disable fast-start and set delay (Vincent Bernat)
99 - [d6d42d5] lldpd: enable fast start by default (Vincent Bernat)
100 - [be511d0] lldpd: make fast start work only when receiving LLDP-MED LLDPDU (Vincent Bernat)
101 - [b9de0ca] lldpd: fast start support (roopa)
102 - [7ba4a18] configure: use `AC_PROG_EGREP` to find a suitable `grep -E` (Vincent Bernat)
103 - [ae5cae0] lib: use uint8_t instead of u_int8_t (Vincent Bernat)
104 - [91e0280] configure: display configured OS (Vincent Bernat)
105 - [885aa4f] lldpcli: complete the manual page with the syntax of "show statistics" (Vincent Bernat)
106 - [d947819] lldpcli: summary of statistics is done on provided ports only (Vincent Bernat)
107 - [048ed9d] lldpcli: fix two warnings introduced by the previous commit (Vincent Bernat)
108 - [adcb76f] NEWS: add an entry for "show statistics summary" command (Vincent Bernat)
109 - [5331eb2] lldpcli: global stats command (roopa)
110 - [1b3eea3] os: add support for DragonFly BSD (Vincent Bernat)
111 - [de461f1] netlink: fix IP address discovery (Vincent Bernat)
112 - [3fc1a10] lldpcli: fix typo in the man page for setting altitude (Vincent Bernat)
113 - [45a83f3] bsd: don't report a warning when no media information is present (Vincent Bernat)
150 - [a1728b7df077] NEWS: add a word about Solaris support (Vincent Bernat)
151 - [b1a8985da685] solaris: less intrusive way to get CMSG_* macros (Vincent Bernat)
152 - [815b799b44ed] solaris: assume that IP forwarding is disabled (Vincent Bernat)
153 - [c3e340b6be8a] solaris: preliminary support (Vincent Bernat)
154 - [d0787f4e65c4] NEWS: add an entry about LLDP-MED fast start. (Vincent Bernat)
155 - [486a61330146] lldpcli: allow to enable/disable fast-start and set delay (Vincent Bernat)
156 - [d6d42d56f7eb] lldpd: enable fast start by default (Vincent Bernat)
157 - [be511d00bf41] lldpd: make fast start work only when receiving LLDP-MED LLDPDU (Vincent Bernat)
158 - [b9de0ca613f3] lldpd: fast start support (roopa)
159 - [7ba4a1832e43] configure: use `AC_PROG_EGREP` to find a suitable `grep -E` (Vincent Bernat)
160 - [ae5cae025029] lib: use uint8_t instead of u_int8_t (Vincent Bernat)
161 - [91e0280a7e7d] configure: display configured OS (Vincent Bernat)
162 - [885aa4f4aaba] lldpcli: complete the manual page with the syntax of "show statistics" (Vincent Bernat)
163 - [d947819daaaa] lldpcli: summary of statistics is done on provided ports only (Vincent Bernat)
164 - [048ed9db7ddf] lldpcli: fix two warnings introduced by the previous commit (Vincent Bernat)
165 - [adcb76f83ac9] NEWS: add an entry for "show statistics summary" command (Vincent Bernat)
166 - [5331eb2d47f0] lldpcli: global stats command (roopa)
167 - [1b3eea3d9025] os: add support for DragonFly BSD (Vincent Bernat)
168 - [de461f15d788] netlink: fix IP address discovery (Vincent Bernat)
169 - [3fc1a10a030f] lldpcli: fix typo in the man page for setting altitude (Vincent Bernat)
170 - [45a83f305d67] bsd: don't report a warning when no media information is present (Vincent Bernat)
114171
115172 0.7.2 [2013-04-20 02:59:47 +0200]:
116173
117 - [03ee074] build: both client and lib may need shipped headers in include/ (Vincent Bernat)
118 - [4c758e8] fgetln: getline may need _GNU_SOURCE (Vincent Bernat)
119 - [bed9f65] install: install ChangeLog (Vincent Bernat)
120 - [21a48c6] bsd: reorder headers to fix compilation of various BSD (Vincent Bernat)
121 - [ef1ae4e] Prepare for 0.7.2 release. (Vincent Bernat)
122 - [ced5eed] doc: update NEWS entry for "show statistics" command (Vincent Bernat)
123 - [ecb92d5] lib: remove unneeded struct for stats in private.h (Vincent Bernat)
124 - [012ec0d] lldpcli: use human labels for statistics (Vincent Bernat)
125 - [ddfbab0] lldpcli: reuse cmd_restrict_ports() to handle port restriction in "show stats" (Vincent Bernat)
126 - [864a7bd] event: add missing <time.h> include (Vincent Bernat)
127 - [7835614] lldpcli: Add support to display lldp stats (roopa)
128 - [fcc2a75] Revert "debian: on Debian, don't ship upstart script" (Vincent Bernat)
129 - [d5e9611] debian: on Debian, don't ship upstart script (Vincent Bernat)
130 - [75b0d3c] debian: require dh-autoreconf for autoreconf.mk to be present (Vincent Bernat)
131 - [43d1095] cdp: force CDPv2 protocol with `-ccc` argument (Vincent Bernat)
132 - [8a77186] lldpd: really accepts only 4 neighbors (Vincent Bernat)
133 - [3333d2a] lldpd: enforce TTL on remote chassis (Vincent Bernat)
134 - [4258966] lldpd: limit the maximum of neighbors per port and per protocol (Vincent Bernat)
135 - [426ee11] README: add a note about executing lldpd without installing it (Vincent Bernat)
136 - [e581ec3] lib: fix sync_recv to handle segmentation (Vincent Bernat)
137 - [3bd96fc] test: add an helper to generate many neighbors (Vincent Bernat)
138 - [dc21d04] lldpd: correctly parse /etc/os-release (Vincent Bernat)
139 - [618db74] lib: `ctlname` in `lldpctl_conn_t` is not const (Vincent Bernat)
140 - [2217afc] lib: bump version-info of liblldpctl for `lldpctl_new_name()` function (Vincent Bernat)
141 - [0262adb] Add a argument to specify the unix control socket (Zang MingJie)
142 - [760f35d] Add autoreconf to call autogen.sh while build deb (Zealot)
143 - [e991f53] build: also ship ./autogen.sh (Vincent Bernat)
144 - [a888bea] build: use the same way as libbsd for version and changelog (Vincent Bernat)
145 - [bf49b9c] build: try to save current version in `VERSION` (Vincent Bernat)
146 - [30d2837] install: remove liblldpctl previous symbolic link (Vincent Bernat)
147 - [c3c22d1] configure: only match tags starting with a digit for version number (Vincent Bernat)
148 - [4c1a8c6] build: check if libevent as provided by pkg-config is working (Vincent Bernat)
149 - [2909519] doc: add documentation about reading /etc/lldpd.conf and /etc/lldpd.d/* (Vincent Bernat)
150 - [981ee4f] interfaces: whitelist an interface before being checking lower (Vincent Bernat)
151 - [ee715bf] libevent: produce smaller binaries when shipping libevent (Vincent Bernat)
152 - [f88442a] lldpcli: possibility to configure tx-delay (Vincent Bernat)
153 - [4a22e2c] lldpcli: fix exit command (Vincent Bernat)
154 - [e15f96d] lldpcli: split actions.c in several files (Vincent Bernat)
155 - [e688f90] lldpcli: put port restriction into a commands.c for use in other files (Vincent Bernat)
156 - [eb78d6e] lldpd: discard output of lldpcli (Vincent Bernat)
157 - [ba529c8] lldpd: pause only if lldpcli has not been disabled (Vincent Bernat)
158 - [e4ff3ed] lldpd: pause at start, unpause through lldpcli (Vincent Bernat)
159 - [51534ef] lldpd: invoke lldpcli at start (Vincent Bernat)
160 - [676b497] ctl: close control socket on error when connecting (Vincent Bernat)
161 - [ade2716] build: lib and client don't need shipped OS specific headers (Vincent Bernat)
162 - [6402fd2] lldpcli: add an option to read commands from files (Vincent Bernat)
163 - [80c974a] Fix some spelling mistakes. (Vincent Bernat)
164 - [24a6367] debian: don't remove inexistent CHANGELOG file (Vincent Bernat)
165 - [81e1569] debian: provide a development package for liblldpctl (Vincent Bernat)
166 - [14c30a6] priv: add ability to lock filter on Linux (Vincent Bernat)
167 - [2d2d6e9] priv: make inability to set write filter as fatal (Vincent Bernat)
168 - [6fd393a] priv: create chroot if it does not exist (Vincent Bernat)
169 - [e735a31] priv: lock BPF interface on BSD (Vincent Bernat)
170 - [72706ac] lldpcli: add "help" command in manual page (Vincent Bernat)
171 - [9791926] osx: don't include "head" bits in homebrew formula (Vincent Bernat)
172 - [5936301] osx: update Homebrew formula with JSON and SNMP support (Vincent Bernat)
173 - [01ac27b] snmp: workaround unknown value for RONLY (Vincent Bernat)
174 - [3abff5c] marshal: serialization may return 0 and target untouched (Vincent Bernat)
175 - [9a6a7f7] snmp: frame.h is not needed anymore (Vincent Bernat)
176 - [aa015c2] clang: additional fixes detected by clang analyzer (Vincent Bernat)
177 - [506273e] Small fixes detected by clang analyzer. (Vincent Bernat)
174 - [03ee074db6ca] build: both client and lib may need shipped headers in include/ (Vincent Bernat)
175 - [4c758e896ded] fgetln: getline may need _GNU_SOURCE (Vincent Bernat)
176 - [bed9f656dc3a] install: install ChangeLog (Vincent Bernat)
177 - [21a48c644336] bsd: reorder headers to fix compilation of various BSD (Vincent Bernat)
178 - [ef1ae4e787c9] Prepare for 0.7.2 release. (Vincent Bernat)
179 - [ced5eed17d20] doc: update NEWS entry for "show statistics" command (Vincent Bernat)
180 - [ecb92d57646e] lib: remove unneeded struct for stats in private.h (Vincent Bernat)
181 - [012ec0d28893] lldpcli: use human labels for statistics (Vincent Bernat)
182 - [ddfbab08bfe5] lldpcli: reuse cmd_restrict_ports() to handle port restriction in "show stats" (Vincent Bernat)
183 - [864a7bd519f1] event: add missing <time.h> include (Vincent Bernat)
184 - [78356144eeab] lldpcli: Add support to display lldp stats (roopa)
185 - [fcc2a75a16e5] Revert "debian: on Debian, don't ship upstart script" (Vincent Bernat)
186 - [d5e9611c1cc9] debian: on Debian, don't ship upstart script (Vincent Bernat)
187 - [75b0d3c2c502] debian: require dh-autoreconf for autoreconf.mk to be present (Vincent Bernat)
188 - [43d109568939] cdp: force CDPv2 protocol with `-ccc` argument (Vincent Bernat)
189 - [8a771868ceb8] lldpd: really accepts only 4 neighbors (Vincent Bernat)
190 - [3333d2a8a810] lldpd: enforce TTL on remote chassis (Vincent Bernat)
191 - [4258966022fc] lldpd: limit the maximum of neighbors per port and per protocol (Vincent Bernat)
192 - [426ee11eefd4] README: add a note about executing lldpd without installing it (Vincent Bernat)
193 - [e581ec3043d5] lib: fix sync_recv to handle segmentation (Vincent Bernat)
194 - [3bd96fcb13a5] test: add an helper to generate many neighbors (Vincent Bernat)
195 - [dc21d049d798] lldpd: correctly parse /etc/os-release (Vincent Bernat)
196 - [618db74a5ae6] lib: `ctlname` in `lldpctl_conn_t` is not const (Vincent Bernat)
197 - [2217afc54e49] lib: bump version-info of liblldpctl for `lldpctl_new_name()` function (Vincent Bernat)
198 - [0262adbbcca0] Add a argument to specify the unix control socket (Zang MingJie)
199 - [760f35d4bc41] Add autoreconf to call autogen.sh while build deb (Zealot)
200 - [e991f5366914] build: also ship ./autogen.sh (Vincent Bernat)
201 - [a888bea6f086] build: use the same way as libbsd for version and changelog (Vincent Bernat)
202 - [bf49b9c17799] build: try to save current version in `VERSION` (Vincent Bernat)
203 - [30d283708fd6] install: remove liblldpctl previous symbolic link (Vincent Bernat)
204 - [c3c22d18622f] configure: only match tags starting with a digit for version number (Vincent Bernat)
205 - [4c1a8c615221] build: check if libevent as provided by pkg-config is working (Vincent Bernat)
206 - [290951985e0b] doc: add documentation about reading /etc/lldpd.conf and /etc/lldpd.d/* (Vincent Bernat)
207 - [981ee4fec9fb] interfaces: whitelist an interface before being checking lower (Vincent Bernat)
208 - [ee715bf2f9ee] libevent: produce smaller binaries when shipping libevent (Vincent Bernat)
209 - [f88442acdee8] lldpcli: possibility to configure tx-delay (Vincent Bernat)
210 - [4a22e2c14364] lldpcli: fix exit command (Vincent Bernat)
211 - [e15f96d2ae0e] lldpcli: split actions.c in several files (Vincent Bernat)
212 - [e688f90f6d38] lldpcli: put port restriction into a commands.c for use in other files (Vincent Bernat)
213 - [eb78d6e3d9be] lldpd: discard output of lldpcli (Vincent Bernat)
214 - [ba529c82f338] lldpd: pause only if lldpcli has not been disabled (Vincent Bernat)
215 - [e4ff3ed5cec2] lldpd: pause at start, unpause through lldpcli (Vincent Bernat)
216 - [51534ef3a17f] lldpd: invoke lldpcli at start (Vincent Bernat)
217 - [676b4970ddd5] ctl: close control socket on error when connecting (Vincent Bernat)
218 - [ade27163aa55] build: lib and client don't need shipped OS specific headers (Vincent Bernat)
219 - [6402fd2c61c0] lldpcli: add an option to read commands from files (Vincent Bernat)
220 - [80c974a8d66a] Fix some spelling mistakes. (Vincent Bernat)
221 - [24a63670e5b6] debian: don't remove inexistent CHANGELOG file (Vincent Bernat)
222 - [81e1569c2406] debian: provide a development package for liblldpctl (Vincent Bernat)
223 - [14c30a6bf6af] priv: add ability to lock filter on Linux (Vincent Bernat)
224 - [2d2d6e9503d9] priv: make inability to set write filter as fatal (Vincent Bernat)
225 - [6fd393a2ffe2] priv: create chroot if it does not exist (Vincent Bernat)
226 - [e735a3196e17] priv: lock BPF interface on BSD (Vincent Bernat)
227 - [72706acd815f] lldpcli: add "help" command in manual page (Vincent Bernat)
228 - [9791926353b0] osx: don't include "head" bits in homebrew formula (Vincent Bernat)
229 - [593630190cdd] osx: update Homebrew formula with JSON and SNMP support (Vincent Bernat)
230 - [01ac27b2a3cd] snmp: workaround unknown value for RONLY (Vincent Bernat)
231 - [3abff5ce6dac] marshal: serialization may return 0 and target untouched (Vincent Bernat)
232 - [9a6a7f740943] snmp: frame.h is not needed anymore (Vincent Bernat)
233 - [aa015c2618ec] clang: additional fixes detected by clang analyzer (Vincent Bernat)
234 - [506273e9a272] Small fixes detected by clang analyzer. (Vincent Bernat)
178235
179236 0.7.1 [2013-01-13 00:46:46 +0100]:
180237
181 - [a6c894e] packaging: update packaging stuff for release (Vincent Bernat)
182 - [13b47e2] build: more changelog drama (Vincent Bernat)
183 - [ceb3792] systemd: don't use SOCK_CLOEXEC (Vincent Bernat)
184 - [6475817] event: replace obsolete `sigignore()` by `signal()` (Vincent Bernat)
185 - [bf74bda] doc: new homepage for lldpd (Vincent Bernat)
186 - [835c9df] compat: add `strnlen()` which may be absent on some older systems (Vincent Bernat)
187 - [35b6415] bsd: compatibility with systems that do not have interface descriptions (Vincent Bernat)
188 - [d53240c] build: fix changelog generation (Vincent Bernat)
189 - [29e300e] osx: add an homebrew formula (Vincent Bernat)
190 - [0339b9a] configure: compatibility with automake 1.12 (Vincent Bernat)
191 - [6a8ed66] autogen: don't use readlink -f (Vincent Bernat)
192 - [bb1666f] autogen: allow to override commands used (Vincent Bernat)
193 - [547e7dc] dmi: implementation for Mac OS X. (Vincent Bernat)
194 - [e66b7f3] Mac OS X support. (Vincent Bernat)
195 - [4e8e0fd] build: add tag date in changelog (Vincent Bernat)
196 - [cdf67f3] priv: mirror the exit status of the child (Vincent Bernat)
197 - [322aafc] debian: add systemd support (Vincent Bernat)
198 - [8172214] lldpd: remove uncleaned control socket when noone is listening (Vincent Bernat)
199 - [2591639] debian: provide an upstart job (Vincent Bernat)
200 - [2b35e2d] README: mention multi-OS support (Vincent Bernat)
201 - [b210a61] debian: update Debian packaging. (Vincent Bernat)
202 - [a5d1ce7] redhat: fix Redhat packaging (Vincent Bernat)
203 - [0eb9ad1] redhat: update lldpd.spec (Vincent Bernat)
204 - [80771cc] build: fix generation of ChangeLog (Vincent Bernat)
238 - [a6c894e35018] packaging: update packaging stuff for release (Vincent Bernat)
239 - [13b47e2346ad] build: more changelog drama (Vincent Bernat)
240 - [ceb3792235a3] systemd: don't use SOCK_CLOEXEC (Vincent Bernat)
241 - [6475817e06e0] event: replace obsolete `sigignore()` by `signal()` (Vincent Bernat)
242 - [bf74bdaf318d] doc: new homepage for lldpd (Vincent Bernat)
243 - [835c9df64b90] compat: add `strnlen()` which may be absent on some older systems (Vincent Bernat)
244 - [35b64151e9d1] bsd: compatibility with systems that do not have interface descriptions (Vincent Bernat)
245 - [d53240cdf026] build: fix changelog generation (Vincent Bernat)
246 - [29e300e5ab4a] osx: add an homebrew formula (Vincent Bernat)
247 - [0339b9a2e1cd] configure: compatibility with automake 1.12 (Vincent Bernat)
248 - [6a8ed6603229] autogen: don't use readlink -f (Vincent Bernat)
249 - [bb1666fe512e] autogen: allow to override commands used (Vincent Bernat)
250 - [547e7dc09403] dmi: implementation for Mac OS X. (Vincent Bernat)
251 - [e66b7f34ca14] Mac OS X support. (Vincent Bernat)
252 - [4e8e0fd4324a] build: add tag date in changelog (Vincent Bernat)
253 - [cdf67f33be48] priv: mirror the exit status of the child (Vincent Bernat)
254 - [322aafc99739] debian: add systemd support (Vincent Bernat)
255 - [8172214fa00b] lldpd: remove uncleaned control socket when noone is listening (Vincent Bernat)
256 - [2591639f6f81] debian: provide an upstart job (Vincent Bernat)
257 - [2b35e2d075da] README: mention multi-OS support (Vincent Bernat)
258 - [b210a6170020] debian: update Debian packaging. (Vincent Bernat)
259 - [a5d1ce7553c8] redhat: fix Redhat packaging (Vincent Bernat)
260 - [0eb9ad161b5c] redhat: update lldpd.spec (Vincent Bernat)
261 - [80771ccb88b5] build: fix generation of ChangeLog (Vincent Bernat)
205262
206263 0.7.0 [2013-01-06 14:06:19 +0100]:
207264
208 - [2527211] lldpcli: add a "help" command. (Vincent Bernat)
209 - [852728b] lldpcli: fix "source unknown" for Dot3/LLDP-MED power. (Vincent Bernat)
210 - [07f2c56] lldpcli: don't rely on `rl_delete_text()` (Vincent Bernat)
211 - [35f6f4f] lldpcli: make readline library optional. (Vincent Bernat)
212 - [23e7fa3] lldpcli: switch to GNU Readline. (Vincent Bernat)
213 - [86b5c6f] event: trigger the main iteration when starting the main loop. (Vincent Bernat)
214 - [048355f] lldpcli: ensure `conn` is initialized to NULL to avoid a compiler warning (Vincent Bernat)
215 - [552502a] lldpcli: don't propose configure for options not compiled (Vincent Bernat)
216 - [c1173aa] lib: fix a compilation problem when LLDP-MED or Dot3 were disabled (Vincent Bernat)
217 - [c84c43e] redhat: also ship lldpcli (Vincent Bernat)
218 - [3f3e636] redhat: add libedit-devel for RPM distros as well (Vincent Bernat)
219 - [ef28b72] debian: also add libedit-dev as a dependency (Vincent Bernat)
220 - [e0da4f3] travis: add libedit-dev in the dependencies (Vincent Bernat)
221 - [fdc876d] lldpcli: let libedit install its own signal handlers (SIGWINCH) (Vincent Bernat)
222 - [95a17bb] Merge branch 'feature/1/cli' (Vincent Bernat)
223 - [9cac8fe] doc: fix doxygen warnings and don't parse include/linux (Vincent Bernat)
224 - [68e3821] configure: detect libedit without pkg-config (Vincent Bernat)
225 - [40d50aa] build: no need to save CFLAGS LDFLAGS when testing libevent (Vincent Bernat)
226 - [a8be34b] lldpcli: accept a command from the command line arguments (Vincent Bernat)
227 - [9777261] lldpcli: fix manual page about specifying ports. (Vincent Bernat)
228 - [fe80711] lldpcli: rename lldpctl to lldpcli. (Vincent Bernat)
229 - [0a13800] lldpctl: remove "unconfigure" commands (not implemented) (Vincent Bernat)
230 - [9a77566] lldpctl: add a CLI (Vincent Bernat)
231 - [6fcf11c] lib: add a function to retrieve a map (Vincent Bernat)
232 - [1a6df50] lib: fix a memory leak when setting LLDP-MED ELIN number (Vincent Bernat)
233 - [959a54d] event: make levent_send_now() work again (Vincent Bernat)
234 - [a0665ef] NEWS: add a word about detecting interface changes (Vincent Bernat)
235 - [a4c3310] *bsd: listen on PF_ROUTE socket to get interface changes (Vincent Bernat)
236 - [aa313f2] event: avoid socket leak if we cannot register netlink socket (Vincent Bernat)
237 - [579bedd] event: use a separate event timer for each port (Vincent Bernat)
238 - [34e7d35] lldpd: remove unused `g_lastsent` (Vincent Bernat)
239 - [47862f8] marshal: ensure that two identic structures are serialized in the same way (Vincent Bernat)
240 - [2565eae] NEWS: add a word about NetBSD support (Vincent Bernat)
241 - [c258a05] interfaces: correctly detect link down interfaces (Vincent Bernat)
242 - [0484f18] netlink: listen to netlink changes to trigger interface updates (Vincent Bernat)
243 - [bfdc2a8] lldpd: cleanup phase is done in `update_local_ports()` (Vincent Bernat)
244 - [281a5cd] global: fix some issues detected by cppcheck (Vincent Bernat)
245 - [1dfac34] lib: use strlcpy and snprintf instead of strcpy and sprintf (Vincent Bernat)
246 - [8a48b01] openbsd: add DMI information (Vincent Bernat)
247 - [fc8ccb0] openbsd: don't use BIOCSSEESENT with OpenBSD (Vincent Bernat)
248 - [4f26669] freebsd: add DMI support (Vincent Bernat)
249 - [70c9cb0] priv: open special call is only needed for Linux (Vincent Bernat)
250 - [8dab569] Add NetBSD support. (Vincent Bernat)
251 - [d60d0bd] interfaces: put the appropriate aggregation ID when an interface is enslaved (Vincent Bernat)
252 - [fdabbf8] ctl: fix previous partial commit about unix path max length (Vincent Bernat)
253 - [f373225] ctl: don't use a #define to define size, use sizeof() (Vincent Bernat)
254 - [690b944] OpenBSD support. (Vincent Bernat)
255 - [4e5f34c] freebsd: make it compile and work on real FreeBSD systems (Vincent Bernat)
256 - [63aebf5] freebsd: link aggregation only works from FreeBSD 9.1. (Vincent Bernat)
257 - [242845c] freebsd: correctly check if routing is enabled (Vincent Bernat)
258 - [d56bb3b] build: allow more modern coding style with empty initializers (Vincent Bernat)
259 - [fda729f] Add support for FreeBSD. (Vincent Bernat)
260 - [22e8cd6] interfaces: sending/receiving on raw interfaces is OS specific (Vincent Bernat)
261 - [88bc404] interfaces: setting up raw interface with BPF filter is OS specific (Vincent Bernat)
262 - [adbb6e5] interfaces: abstraction of interfaces/devices (Vincent Bernat)
263 - [2fafbd3] netlink: fix bogus alignment warnings (Vincent Bernat)
264 - [2d1fe39] frame: mark with `(void)` when we don't check for result of PEEK/POKE (Vincent Bernat)
265 - [072f743] ctl: fix alignment issue (Vincent Bernat)
266 - [0e940d8] marshal: respect GCC strict-aliasing rule (Vincent Bernat)
267 - [184bd19] interfaces: disable the use of ioctl for bridges (Vincent Bernat)
268 - [5d6aba3] build: ensure _GNU_SOURCE is defined early (Vincent Bernat)
269 - [2516cfb] build: ship a include/ directory (Vincent Bernat)
270 - [c557a63] interfaces: harmonize arguments of detection functions (Vincent Bernat)
271 - [3e2e693] lldpd: fix debug message when discarding a received frame (Vincent Bernat)
272 - [f6c4ca4] interfaces: handle correctly VLAN inside VLAN inside bridges inside bonds (Vincent Bernat)
273 - [e12c236] interfaces: switch to Netlink to gather interface-related information (Vincent Bernat)
274 - [d902e68] build: make autogen.sh a little bit more generic (Vincent Bernat)
275 - [0ac0576] build: use a simplified autogen.sh script (Vincent Bernat)
276 - [34e8e83] libevent: use a git submodule (Vincent Bernat)
277 - [0dee00a] travis: workaround the fact that Travis images are not always up-to-date (Vincent Bernat)
278 - [8b7150e] lldpctl: new JSON output (Vincent Bernat)
279 - [ee23a74] log: remove extra linefeeds from log_*() and fatal*() calls (Vincent Bernat)
280 - [43b82d6] NEWS: add a mention about the fact we can filter debug logs (Vincent Bernat)
281 - [9e5d99d] log: add -D option to filter out debug logs (Vincent Bernat)
282 - [6f8925b] log: convert LLOG_* to log_* and add more debug logs (Vincent Bernat)
283 - [be6db89] snmp: don't send traps when SNMP is not enabled (Vincent Bernat)
284 - [26fa5d1] log: prefix logs with a token to allow filtering (Vincent Bernat)
285 - [c9429a4] log: enhance logging output (Vincent Bernat)
286 - [d889b7c] compile: remove a warning about uninitialized struct (Vincent Bernat)
287 - [1e14097] Update to libevent 2.0.21. (Vincent Bernat)
288 - [46baf62] lldpd: add possibility to disable LLDP (Vincent Bernat)
289 - [181351d] lldp: fix parsing of LLDP pair control (Vincent Bernat)
290 - [b2b9498] build: don't use a comment at start of rule (unportable) (Vincent Bernat)
291 - [e44320f] build: build an empty changelog if not available (Vincent Bernat)
292 - [92b3c20] redhat: don't build SNMP support on CentOS (Vincent Bernat)
293 - [373ebf5] lib: silent some compiler warning about unitialized value (Vincent Bernat)
294 - [7e431da] build: install ChangeLog in /usr/share/doc (Vincent Bernat)
295 - [b216060] debian/redhat: update packaging (Vincent Bernat)
296 - [ba93c52] interfaces: don't listen to enslaved interface until master interface has been configured (Vincent Bernat)
297 - [6c58612] build: use AC_PROG_CC_C99 instead of -std=gnu99 (Vincent Bernat)
298 - [2026447] display: fix display of various Dot3 advertised links (Vincent Bernat)
299 - [f793b28] libevent: upgrade embedded copy to 2.0.20. (Vincent Bernat)
300 - [5fa8eaa] const: fix a type in LLDP_DOT3_MAU_100BASET2FD (Vincent Bernat)
301 - [a254a33] travis: use only two sets of configure options and check "distcheck" and "install" targets (Vincent Bernat)
302 - [1e388a6] build: fix compilation without LLDP MED (Vincent Bernat)
265 - [25272118a034] lldpcli: add a "help" command. (Vincent Bernat)
266 - [852728bc7793] lldpcli: fix "source unknown" for Dot3/LLDP-MED power. (Vincent Bernat)
267 - [07f2c5678ec0] lldpcli: don't rely on `rl_delete_text()` (Vincent Bernat)
268 - [35f6f4fb7360] lldpcli: make readline library optional. (Vincent Bernat)
269 - [23e7fa38bd58] lldpcli: switch to GNU Readline. (Vincent Bernat)
270 - [86b5c6fb48a4] event: trigger the main iteration when starting the main loop. (Vincent Bernat)
271 - [048355f33558] lldpcli: ensure `conn` is initialized to NULL to avoid a compiler warning (Vincent Bernat)
272 - [552502a43d93] lldpcli: don't propose configure for options not compiled (Vincent Bernat)
273 - [c1173aa81a20] lib: fix a compilation problem when LLDP-MED or Dot3 were disabled (Vincent Bernat)
274 - [c84c43ed9cbc] redhat: also ship lldpcli (Vincent Bernat)
275 - [3f3e636cfb45] redhat: add libedit-devel for RPM distros as well (Vincent Bernat)
276 - [ef28b72f8069] debian: also add libedit-dev as a dependency (Vincent Bernat)
277 - [e0da4f391e32] travis: add libedit-dev in the dependencies (Vincent Bernat)
278 - [fdc876d63596] lldpcli: let libedit install its own signal handlers (SIGWINCH) (Vincent Bernat)
279 - [95a17bbc07eb] Merge branch 'feature/1/cli' (Vincent Bernat)
280 - [9cac8fed5db1] doc: fix doxygen warnings and don't parse include/linux (Vincent Bernat)
281 - [68e382123271] configure: detect libedit without pkg-config (Vincent Bernat)
282 - [40d50aa35cbb] build: no need to save CFLAGS LDFLAGS when testing libevent (Vincent Bernat)
283 - [a8be34bae896] lldpcli: accept a command from the command line arguments (Vincent Bernat)
284 - [9777261948ae] lldpcli: fix manual page about specifying ports. (Vincent Bernat)
285 - [fe80711eda57] lldpcli: rename lldpctl to lldpcli. (Vincent Bernat)
286 - [0a138003b697] lldpctl: remove "unconfigure" commands (not implemented) (Vincent Bernat)
287 - [9a775667baec] lldpctl: add a CLI (Vincent Bernat)
288 - [6fcf11caf862] lib: add a function to retrieve a map (Vincent Bernat)
289 - [1a6df50ef4ce] lib: fix a memory leak when setting LLDP-MED ELIN number (Vincent Bernat)
290 - [959a54d447eb] event: make levent_send_now() work again (Vincent Bernat)
291 - [a0665efae40a] NEWS: add a word about detecting interface changes (Vincent Bernat)
292 - [a4c33103e900] *bsd: listen on PF_ROUTE socket to get interface changes (Vincent Bernat)
293 - [aa313f2a78c4] event: avoid socket leak if we cannot register netlink socket (Vincent Bernat)
294 - [579bedd5494c] event: use a separate event timer for each port (Vincent Bernat)
295 - [34e7d3573540] lldpd: remove unused `g_lastsent` (Vincent Bernat)
296 - [47862f89afec] marshal: ensure that two identic structures are serialized in the same way (Vincent Bernat)
297 - [2565eae6c19d] NEWS: add a word about NetBSD support (Vincent Bernat)
298 - [c258a053f9bb] interfaces: correctly detect link down interfaces (Vincent Bernat)
299 - [0484f180fafd] netlink: listen to netlink changes to trigger interface updates (Vincent Bernat)
300 - [bfdc2a8c2b08] lldpd: cleanup phase is done in `update_local_ports()` (Vincent Bernat)
301 - [281a5cd416ee] global: fix some issues detected by cppcheck (Vincent Bernat)
302 - [1dfac34651aa] lib: use strlcpy and snprintf instead of strcpy and sprintf (Vincent Bernat)
303 - [8a48b0132b9f] openbsd: add DMI information (Vincent Bernat)
304 - [fc8ccb0fffa5] openbsd: don't use BIOCSSEESENT with OpenBSD (Vincent Bernat)
305 - [4f266697a1a5] freebsd: add DMI support (Vincent Bernat)
306 - [70c9cb05ff14] priv: open special call is only needed for Linux (Vincent Bernat)
307 - [8dab56982450] Add NetBSD support. (Vincent Bernat)
308 - [d60d0bd7c99f] interfaces: put the appropriate aggregation ID when an interface is enslaved (Vincent Bernat)
309 - [fdabbf8ed7cd] ctl: fix previous partial commit about unix path max length (Vincent Bernat)
310 - [f373225ac654] ctl: don't use a #define to define size, use sizeof() (Vincent Bernat)
311 - [690b944cc01b] OpenBSD support. (Vincent Bernat)
312 - [4e5f34c5231a] freebsd: make it compile and work on real FreeBSD systems (Vincent Bernat)
313 - [63aebf55ecee] freebsd: link aggregation only works from FreeBSD 9.1. (Vincent Bernat)
314 - [242845c75482] freebsd: correctly check if routing is enabled (Vincent Bernat)
315 - [d56bb3bd6cf8] build: allow more modern coding style with empty initializers (Vincent Bernat)
316 - [fda729fd1232] Add support for FreeBSD. (Vincent Bernat)
317 - [22e8cd65738d] interfaces: sending/receiving on raw interfaces is OS specific (Vincent Bernat)
318 - [88bc404fec75] interfaces: setting up raw interface with BPF filter is OS specific (Vincent Bernat)
319 - [adbb6e54c36c] interfaces: abstraction of interfaces/devices (Vincent Bernat)
320 - [2fafbd309cac] netlink: fix bogus alignment warnings (Vincent Bernat)
321 - [2d1fe392f355] frame: mark with `(void)` when we don't check for result of PEEK/POKE (Vincent Bernat)
322 - [072f743c2660] ctl: fix alignment issue (Vincent Bernat)
323 - [0e940d8ddac5] marshal: respect GCC strict-aliasing rule (Vincent Bernat)
324 - [184bd1993249] interfaces: disable the use of ioctl for bridges (Vincent Bernat)
325 - [5d6aba3e3a87] build: ensure _GNU_SOURCE is defined early (Vincent Bernat)
326 - [2516cfb1d6d4] build: ship a include/ directory (Vincent Bernat)
327 - [c557a63b6a17] interfaces: harmonize arguments of detection functions (Vincent Bernat)
328 - [3e2e693ca5ca] lldpd: fix debug message when discarding a received frame (Vincent Bernat)
329 - [f6c4ca4b8f8c] interfaces: handle correctly VLAN inside VLAN inside bridges inside bonds (Vincent Bernat)
330 - [e12c2365d18e] interfaces: switch to Netlink to gather interface-related information (Vincent Bernat)
331 - [d902e68880f1] build: make autogen.sh a little bit more generic (Vincent Bernat)
332 - [0ac0576e3b65] build: use a simplified autogen.sh script (Vincent Bernat)
333 - [34e8e83f88f9] libevent: use a git submodule (Vincent Bernat)
334 - [0dee00a2c59c] travis: workaround the fact that Travis images are not always up-to-date (Vincent Bernat)
335 - [8b7150e4d936] lldpctl: new JSON output (Vincent Bernat)
336 - [ee23a74f24a3] log: remove extra linefeeds from log_*() and fatal*() calls (Vincent Bernat)
337 - [43b82d6eb660] NEWS: add a mention about the fact we can filter debug logs (Vincent Bernat)
338 - [9e5d99d4ea52] log: add -D option to filter out debug logs (Vincent Bernat)
339 - [6f8925bed5a1] log: convert LLOG_* to log_* and add more debug logs (Vincent Bernat)
340 - [be6db89386e1] snmp: don't send traps when SNMP is not enabled (Vincent Bernat)
341 - [26fa5d1793cf] log: prefix logs with a token to allow filtering (Vincent Bernat)
342 - [c9429a4256d3] log: enhance logging output (Vincent Bernat)
343 - [d889b7ce37a2] compile: remove a warning about uninitialized struct (Vincent Bernat)
344 - [1e1409746c8d] Update to libevent 2.0.21. (Vincent Bernat)
345 - [46baf62775ea] lldpd: add possibility to disable LLDP (Vincent Bernat)
346 - [181351d6bfdd] lldp: fix parsing of LLDP pair control (Vincent Bernat)
347 - [b2b9498cf7e4] build: don't use a comment at start of rule (unportable) (Vincent Bernat)
348 - [e44320fdaacd] build: build an empty changelog if not available (Vincent Bernat)
349 - [92b3c20a991b] redhat: don't build SNMP support on CentOS (Vincent Bernat)
350 - [373ebf556453] lib: silent some compiler warning about unitialized value (Vincent Bernat)
351 - [7e431dafbdb8] build: install ChangeLog in /usr/share/doc (Vincent Bernat)
352 - [b21606074250] debian/redhat: update packaging (Vincent Bernat)
353 - [ba93c521b3b2] interfaces: don't listen to enslaved interface until master interface has been configured (Vincent Bernat)
354 - [6c5861233e6b] build: use AC_PROG_CC_C99 instead of -std=gnu99 (Vincent Bernat)
355 - [2026447359d1] display: fix display of various Dot3 advertised links (Vincent Bernat)
356 - [f793b28b330c] libevent: upgrade embedded copy to 2.0.20. (Vincent Bernat)
357 - [5fa8eaa5917d] const: fix a type in LLDP_DOT3_MAU_100BASET2FD (Vincent Bernat)
358 - [a254a33eff08] travis: use only two sets of configure options and check "distcheck" and "install" targets (Vincent Bernat)
359 - [1e388a697bb8] build: fix compilation without LLDP MED (Vincent Bernat)
303360
304361 0.6.1 [2012-09-04 21:10:49 +0200]:
305362
306 - [a5cf540] build: move manual page next to the source code (Vincent Bernat)
307 - [ef9d447] build: add author name and commit hash in generated changelog (Vincent Bernat)
308 - [25de85a] snmp: add lldpRemTablesChange notification (Vincent Bernat)
309 - [14052b6] lldpd: add proper insert/delete/ageout counters (Vincent Bernat)
310 - [8843f16] general: use "TX interval" instead of "TX delay" to be more coherent with the MIB (Vincent Bernat)
311 - [94d2efe] doc: add appropriate titles to groups in lldpctl.h (Vincent Bernat)
312 - [b1eceab] doc: polish documentation of liblldpctl (Vincent Bernat)
313 - [d79c3de] tests: fix tests compilation (Vincent Bernat)
314 - [0113555] build: fix "make dist" (Vincent Bernat)
315 - [47287a6] lldpctl: add the possibility to force lldpd to start the main loop now (Vincent Bernat)
316 - [8729d69] lldpctl: allow to display global configuration of lldpd (Vincent Bernat)
317 - [8ec333b] lldpd: move configuration stuff into a dedicated structure (Vincent Bernat)
318 - [e5b5db2] lldpctl: just require access to the socket for actions, not root priv (Vincent Bernat)
319 - [74e0080] marshal: don't marshal the list of chassis (Vincent Bernat)
320 - [0f957f3] ctl: fix reception of several messages at once (Vincent Bernat)
321 - [be96969] ctl: don't serialize notification if no client needs it (Vincent Bernat)
322 - [8237454] ctl: increase maximum message size to 512 KB (Vincent Bernat)
323 - [4e90a9e] lldpctl: add a "-w" option to watch neighbor changes (Vincent Bernat)
324 - [e0478a4] client: use libevent's bufferevent infrastructure to handle clients (Vincent Bernat)
325 - [4b292b5] Separate daemon and client code. Provide a client library. (Vincent Bernat)
326 - [31093dd] dist: provide a complete changelog (Vincent Bernat)
327 - [5fb6f53] privsep: copy errno before sending it (Vincent Bernat)
328 - [f00bebf] redhat: properly restart lldpd on upgrade (Vincent Bernat)
329 - [06f9c30] snmp: remove extra '\n' at the end of SNMP log message (Vincent Bernat)
330 - [198bbe4] lldpd: demote "unable to guess" to debug (Vincent Bernat)
331 - [595184b] lldpd: disable SIGPIPE signal (Vincent Bernat)
332 - [c461e5d] configure: cleanup libevent integration (Vincent Bernat)
333 - [96e49a4] Add a `-v` flag to just get version number. (Vincent Bernat)
334 - [c882a2c] State that the license is usually referred as the ISC license. (Vincent Bernat)
335 - [2e91d1a] lldpd: listen on Unix socket before forking (Vincent Bernat)
363 - [a5cf540cbcf7] build: move manual page next to the source code (Vincent Bernat)
364 - [ef9d4476b135] build: add author name and commit hash in generated changelog (Vincent Bernat)
365 - [25de85a4f938] snmp: add lldpRemTablesChange notification (Vincent Bernat)
366 - [14052b619757] lldpd: add proper insert/delete/ageout counters (Vincent Bernat)
367 - [8843f1689739] general: use "TX interval" instead of "TX delay" to be more coherent with the MIB (Vincent Bernat)
368 - [94d2efe55a26] doc: add appropriate titles to groups in lldpctl.h (Vincent Bernat)
369 - [b1eceab615bf] doc: polish documentation of liblldpctl (Vincent Bernat)
370 - [d79c3de4ed9a] tests: fix tests compilation (Vincent Bernat)
371 - [011355532558] build: fix "make dist" (Vincent Bernat)
372 - [47287a61f1ab] lldpctl: add the possibility to force lldpd to start the main loop now (Vincent Bernat)
373 - [8729d69f28a7] lldpctl: allow to display global configuration of lldpd (Vincent Bernat)
374 - [8ec333bd2826] lldpd: move configuration stuff into a dedicated structure (Vincent Bernat)
375 - [e5b5db2463f0] lldpctl: just require access to the socket for actions, not root priv (Vincent Bernat)
376 - [74e0080ed1a0] marshal: don't marshal the list of chassis (Vincent Bernat)
377 - [0f957f3abc06] ctl: fix reception of several messages at once (Vincent Bernat)
378 - [be9696919434] ctl: don't serialize notification if no client needs it (Vincent Bernat)
379 - [82374540f765] ctl: increase maximum message size to 512 KB (Vincent Bernat)
380 - [4e90a9e0b465] lldpctl: add a "-w" option to watch neighbor changes (Vincent Bernat)
381 - [e0478a46c5c9] client: use libevent's bufferevent infrastructure to handle clients (Vincent Bernat)
382 - [4b292b556534] Separate daemon and client code. Provide a client library. (Vincent Bernat)
383 - [31093dd92095] dist: provide a complete changelog (Vincent Bernat)
384 - [5fb6f53b1d9c] privsep: copy errno before sending it (Vincent Bernat)
385 - [f00bebf686b0] redhat: properly restart lldpd on upgrade (Vincent Bernat)
386 - [06f9c307dd73] snmp: remove extra '\n' at the end of SNMP log message (Vincent Bernat)
387 - [198bbe4085ab] lldpd: demote "unable to guess" to debug (Vincent Bernat)
388 - [595184b05260] lldpd: disable SIGPIPE signal (Vincent Bernat)
389 - [c461e5dac8cd] configure: cleanup libevent integration (Vincent Bernat)
390 - [96e49a40c6c0] Add a `-v` flag to just get version number. (Vincent Bernat)
391 - [c882a2cf0c1e] State that the license is usually referred as the ISC license. (Vincent Bernat)
392 - [2e91d1a1a0f9] lldpd: listen on Unix socket before forking (Vincent Bernat)
336393
337394 0.6.0 [2012-05-04 22:22:56 +0200]:
338395
339 - [eb8e309] automake: libevent.la is not a convenience library (Vincent Bernat)
340 - [2a836f0] client: fix unused variable when LLDPMED support is not compiled (Vincent Bernat)
341 - [01d467d] marshal: use zero-sized array instead of flexible arrays (Vincent Bernat)
342 - [5fd6695] Don't mix declarations and statements. (Vincent Bernat)
343 - [3685a1f] configure: don't check for SLIST_* stuff: we don't use them (Vincent Bernat)
344 - [219c432] snmp: only call run_alarms() on SNMP timeouts (Vincent Bernat)
345 - [dc20dd4] configure: make ./autogen.sh non recursive (Vincent Bernat)
346 - [223227c] configure: use AC_PROG_CXX macro (Vincent Bernat)
347 - [ea87eb6] configure: always configure libevent to make "make dist" work (Vincent Bernat)
348 - [257db88] ctl: no need to keep a list of active clients (Vincent Bernat)
349 - [29fc2d4] Really ship libevent. (Vincent Bernat)
350 - [e5c9465] Ship an embedded copy of libevent. (Vincent Bernat)
351 - [f9f801e] configure: don't test for XML2 linking, useless (Vincent Bernat)
352 - [19d42b5] configure: remove old unwanted cruft (Vincent Bernat)
353 - [75b15cd] configure: drop dependency with libtool (Vincent Bernat)
354 - [5b4cd84] configure: enable compilation of a libevent archive (Vincent Bernat)
355 - [68b375c] Update changelog, travis and packaging for libevent (Vincent Bernat)
356 - [d6e889b] lldpd: switch to libevent loop (Vincent Bernat)
357 - [1daca82] configure: upgrade to libevent 2.x (Vincent Bernat)
358 - [8beb9a7] Integration of libevent into the build system. (Vincent Bernat)
359 - [b1f816c] lldpd: on exit, remove remote ports before removing local ones (Vincent Bernat)
360 - [d938c51] lldpd: fix chassis copy (Vincent Bernat)
361 - [3f0d19b] valgrind: initialize some buffers to make valgrind happy (Vincent Bernat)
362 - [396cfdf] When running on valgrind, don't chroot or drop privileges (Vincent Bernat)
363 - [ce05de5] travis: add Travis CI link to README (Vincent Bernat)
364 - [5345fe0] tests: when Dot3 feature is disabled, MFS is not transmitted (Vincent Bernat)
365 - [f15d395] Allow compilation without Dot1. (Vincent Bernat)
366 - [3b5c1f5] travis: use apt-get instead of aptitude (Vincent Bernat)
367 - [998c1ac] travis: use provided configure argument (Vincent Bernat)
368 - [fccbb8c] Integration with Travis CI (Vincent Bernat)
369 - [d4e4c80] mgmt: allow one to provide a pattern to specify management addresses (Vincent Bernat)
370 - [2135cce] Update CHANGELOG with entry about management addresses. (Vincent Bernat)
371 - [af3caa3] snmp: add support for IPv6 management addresses (Vincent Bernat)
372 - [2eec554] snmp: fix SNMP support for management addresses (Vincent Bernat)
373 - [c6a7d3e] edp: ensure we don't add the same address over and over (Vincent Bernat)
374 - [5fb2791] mgmt: free management addresses when freeing the chassis (Vincent Bernat)
375 - [400c648] edp: steal IP addresses from the received chassis instead of copying them (Vincent Bernat)
376 - [f1e5d0c] cdp: allow to send several IP addresses (Vincent Bernat)
377 - [e6b36c8] Support for multiple IPv4/IPv6 management addresses. (João Valverde)
378 - [60e33ae] tests: fix location of .h files (they are in top_srcdir, not in top_builddir) (Vincent Bernat)
379 - [a9317c7] lldpd: add a better error message when we cannot create the unix socket (Vincent Bernat)
380 - [4593c0d] configure: automatically compute version from git (Vincent Bernat)
381 - [ba5116b] lldpd: add interface to message about unguessable frame type (Vincent Bernat)
382 - [c520cb1] lldpd: do not stay stuck in the receive loop (Vincent Bernat)
383 - [350cd69] snmp: better integration of SNMP logging subsystem (Vincent Bernat)
384 - [d4afb91] cdp: allow to override value of platform TLV (Linux by default) (Vincent Bernat)
385 - [6172335] redhat: make the init script compatible with RHEL < 5 (Vincent Bernat)
386 - [6578dc6] marshal: circumvent cast alignment problems using memcpy (Vincent Bernat)
387 - [0c0991d] tests: when comparing port ID and chassis ID, uses strncmp (Vincent Bernat)
388 - [14c9294] Use %zu for printf() when argument is of kind size_t. (Vincent Bernat)
389 - [5339e72] Add a flag to specify which interfaces to use for chassis ID. (Vincent Bernat)
390 - [b4ac808] Change the way Chassis ID is assigned. (Vincent Bernat)
391 - [566c635] lldpd: remove unneeded forward declarations (Vincent Bernat)
392 - [31ee070] interfaces: remove unneeded forward declarations (Vincent Bernat)
393 - [9c43aeb] lldpctl: add a flag to display hidden ports (Vincent Bernat)
394 - [da92cd5] Update CHANGELOG with actual changes from 0.5.6. (Vincent Bernat)
395 - [2c86e31] Provide a .gitignore. (Vincent Bernat)
396 - [0c79e03] Add missing lldpctl.h header file (Vincent Bernat)
397 - [132d1e4] Use LIBADD instead of LDADD when appropriate. (Vincent Bernat)
398 - [e49b274] Compilation fixes when disabling some part of lldpd (Vincent Bernat)
399 - [f6d2063] Major rewrite: rewrite lldpd/lldpctl communication mechanism (Vincent Bernat)
400 - [6bf5e74] marshal: fix list marshalling and various other changes (Vincent Bernat)
401 - [4d1a5b3] core: SMART_HIDDEN macro does not really need the configuration (Vincent Bernat)
402 - [1e71c30] Point to appropriate LLDP page on Wikipedia instead of disambiguation page. (Vincent Bernat)
403 - [8d72aaa] configure: fix an issue with netsnmp_enable_subagent detection (Vincent Bernat)
404 - [305e061] marshal: add a way to ignore a pointer (setting it to NULL) (Vincent Bernat)
405 - [ca4ed9d] marshal: handle fixed-size strings (Vincent Bernat)
406 - [da78114] marshal: allow to specify null-terminated strings (Vincent Bernat)
407 - [5e73393] marshal: use shorter macro names (Vincent Bernat)
408 - [db32355] Add a new serialization engine. (Vincent Bernat)
409 - [f3324c9] tests: only compile check_snmp if SNMP support is available (Vincent Bernat)
410 - [f700814] snmp: ensure single inclusion of agent.h header (Vincent Bernat)
411 - [4e22da4] snmp: add unit tests (Vincent Bernat)
412 - [902d0d2] tests: Simplify Makefile.am (Vincent Bernat)
413 - [2da3280] Start branch 0.6. (Vincent Bernat)
414 - [077f760] snmp: factorisation of agent_h_*med*() functions (Vincent Bernat)
415 - [14e9519] snmp: factorisation of local/remote port handlers (Vincent Bernat)
416 - [f645906] snmp: factorisation of local/remote handlers (Vincent Bernat)
417 - [e8c9b6b] snmp: use a header_*indexed function for local management address (Vincent Bernat)
418 - [26836a4] snmp: rework indexing (Vincent Bernat)
396 - [eb8e3096a4fe] automake: libevent.la is not a convenience library (Vincent Bernat)
397 - [2a836f02ede4] client: fix unused variable when LLDPMED support is not compiled (Vincent Bernat)
398 - [01d467defd2f] marshal: use zero-sized array instead of flexible arrays (Vincent Bernat)
399 - [5fd6695c090d] Don't mix declarations and statements. (Vincent Bernat)
400 - [3685a1f74204] configure: don't check for SLIST_* stuff: we don't use them (Vincent Bernat)
401 - [219c432e6df0] snmp: only call run_alarms() on SNMP timeouts (Vincent Bernat)
402 - [dc20dd45edc3] configure: make ./autogen.sh non recursive (Vincent Bernat)
403 - [223227c8f8d0] configure: use AC_PROG_CXX macro (Vincent Bernat)
404 - [ea87eb6dc6cb] configure: always configure libevent to make "make dist" work (Vincent Bernat)
405 - [257db8858ee7] ctl: no need to keep a list of active clients (Vincent Bernat)
406 - [29fc2d4df9c0] Really ship libevent. (Vincent Bernat)
407 - [e5c9465245e4] Ship an embedded copy of libevent. (Vincent Bernat)
408 - [f9f801e050ec] configure: don't test for XML2 linking, useless (Vincent Bernat)
409 - [19d42b5579ce] configure: remove old unwanted cruft (Vincent Bernat)
410 - [75b15cd92ced] configure: drop dependency with libtool (Vincent Bernat)
411 - [5b4cd8459dcb] configure: enable compilation of a libevent archive (Vincent Bernat)
412 - [68b375c3eacc] Update changelog, travis and packaging for libevent (Vincent Bernat)
413 - [d6e889b6888b] lldpd: switch to libevent loop (Vincent Bernat)
414 - [1daca82702fb] configure: upgrade to libevent 2.x (Vincent Bernat)
415 - [8beb9a73b624] Integration of libevent into the build system. (Vincent Bernat)
416 - [b1f816cc30ec] lldpd: on exit, remove remote ports before removing local ones (Vincent Bernat)
417 - [d938c51f1240] lldpd: fix chassis copy (Vincent Bernat)
418 - [3f0d19bb5a7a] valgrind: initialize some buffers to make valgrind happy (Vincent Bernat)
419 - [396cfdfee8b3] When running on valgrind, don't chroot or drop privileges (Vincent Bernat)
420 - [ce05de5422c8] travis: add Travis CI link to README (Vincent Bernat)
421 - [5345fe05fa8a] tests: when Dot3 feature is disabled, MFS is not transmitted (Vincent Bernat)
422 - [f15d3950df21] Allow compilation without Dot1. (Vincent Bernat)
423 - [3b5c1f554153] travis: use apt-get instead of aptitude (Vincent Bernat)
424 - [998c1acbfe7f] travis: use provided configure argument (Vincent Bernat)
425 - [fccbb8cb7f34] Integration with Travis CI (Vincent Bernat)
426 - [d4e4c80427cf] mgmt: allow one to provide a pattern to specify management addresses (Vincent Bernat)
427 - [2135cce18f63] Update CHANGELOG with entry about management addresses. (Vincent Bernat)
428 - [af3caa3bab79] snmp: add support for IPv6 management addresses (Vincent Bernat)
429 - [2eec55408cb9] snmp: fix SNMP support for management addresses (Vincent Bernat)
430 - [c6a7d3e4a753] edp: ensure we don't add the same address over and over (Vincent Bernat)
431 - [5fb27919d237] mgmt: free management addresses when freeing the chassis (Vincent Bernat)
432 - [400c64838953] edp: steal IP addresses from the received chassis instead of copying them (Vincent Bernat)
433 - [f1e5d0cd3a20] cdp: allow to send several IP addresses (Vincent Bernat)
434 - [e6b36c8751d1] Support for multiple IPv4/IPv6 management addresses. (João Valverde)
435 - [60e33aec988f] tests: fix location of .h files (they are in top_srcdir, not in top_builddir) (Vincent Bernat)
436 - [a9317c745c46] lldpd: add a better error message when we cannot create the unix socket (Vincent Bernat)
437 - [4593c0dc0124] configure: automatically compute version from git (Vincent Bernat)
438 - [ba5116b5f59d] lldpd: add interface to message about unguessable frame type (Vincent Bernat)
439 - [c520cb1446b2] lldpd: do not stay stuck in the receive loop (Vincent Bernat)
440 - [350cd69596ae] snmp: better integration of SNMP logging subsystem (Vincent Bernat)
441 - [d4afb919c2cb] cdp: allow to override value of platform TLV (Linux by default) (Vincent Bernat)
442 - [617233512778] redhat: make the init script compatible with RHEL < 5 (Vincent Bernat)
443 - [6578dc6a7cc8] marshal: circumvent cast alignment problems using memcpy (Vincent Bernat)
444 - [0c0991d8ced8] tests: when comparing port ID and chassis ID, uses strncmp (Vincent Bernat)
445 - [14c929401cf3] Use %zu for printf() when argument is of kind size_t. (Vincent Bernat)
446 - [5339e725f4e7] Add a flag to specify which interfaces to use for chassis ID. (Vincent Bernat)
447 - [b4ac808343b7] Change the way Chassis ID is assigned. (Vincent Bernat)
448 - [566c635dd605] lldpd: remove unneeded forward declarations (Vincent Bernat)
449 - [31ee070d4a0f] interfaces: remove unneeded forward declarations (Vincent Bernat)
450 - [9c43aeb47ed9] lldpctl: add a flag to display hidden ports (Vincent Bernat)
451 - [da92cd5754c3] Update CHANGELOG with actual changes from 0.5.6. (Vincent Bernat)
452 - [2c86e3103159] Provide a .gitignore. (Vincent Bernat)
453 - [0c79e036b012] Add missing lldpctl.h header file (Vincent Bernat)
454 - [132d1e41c368] Use LIBADD instead of LDADD when appropriate. (Vincent Bernat)
455 - [e49b274abcb2] Compilation fixes when disabling some part of lldpd (Vincent Bernat)
456 - [f6d206319b2f] Major rewrite: rewrite lldpd/lldpctl communication mechanism (Vincent Bernat)
457 - [6bf5e749dffa] marshal: fix list marshalling and various other changes (Vincent Bernat)
458 - [4d1a5b391098] core: SMART_HIDDEN macro does not really need the configuration (Vincent Bernat)
459 - [1e71c30bf070] Point to appropriate LLDP page on Wikipedia instead of disambiguation page. (Vincent Bernat)
460 - [8d72aaa09c19] configure: fix an issue with netsnmp_enable_subagent detection (Vincent Bernat)
461 - [305e061cbc5e] marshal: add a way to ignore a pointer (setting it to NULL) (Vincent Bernat)
462 - [ca4ed9da4720] marshal: handle fixed-size strings (Vincent Bernat)
463 - [da7811412516] marshal: allow to specify null-terminated strings (Vincent Bernat)
464 - [5e73393be53d] marshal: use shorter macro names (Vincent Bernat)
465 - [db3235553830] Add a new serialization engine. (Vincent Bernat)
466 - [f3324c93b101] tests: only compile check_snmp if SNMP support is available (Vincent Bernat)
467 - [f70081478cb1] snmp: ensure single inclusion of agent.h header (Vincent Bernat)
468 - [4e22da4ce3a0] snmp: add unit tests (Vincent Bernat)
469 - [902d0d2ecf34] tests: Simplify Makefile.am (Vincent Bernat)
470 - [2da3280e895c] Start branch 0.6. (Vincent Bernat)
471 - [077f76011035] snmp: factorisation of agent_h_*med*() functions (Vincent Bernat)
472 - [14e9519eb3ec] snmp: factorisation of local/remote port handlers (Vincent Bernat)
473 - [f645906c8361] snmp: factorisation of local/remote handlers (Vincent Bernat)
474 - [e8c9b6bba8a8] snmp: use a header_*indexed function for local management address (Vincent Bernat)
475 - [26836a43d2f2] snmp: rework indexing (Vincent Bernat)
419476
420477 0.5.7 [2012-02-29 23:14:41 +0100]:
421478
422 - [a8b66dd] lldpd: do not stay stuck in the receive loop (Vincent Bernat)
423 - [c1232d5] Add previous change to changelog. (Vincent Bernat)
424 - [314e1fe] configure: fix an issue with netsnmp_enable_subagent detection (Vincent Bernat)
479 - [a8b66dd39ca5] lldpd: do not stay stuck in the receive loop (Vincent Bernat)
480 - [c1232d59d6f3] Add previous change to changelog. (Vincent Bernat)
481 - [314e1fe612f8] configure: fix an issue with netsnmp_enable_subagent detection (Vincent Bernat)
425482
426483 0.5.6 [2012-01-16 16:16:39 +0100]:
427484
428 - [ceb406a] Next release for this branch is 0.5.6. (Vincent Bernat)
429 - [3b3a196] Continuation of the previous patch. (Vincent Bernat)
430 - [58ebf59] frame.h uses very generic memeber names that resusts in conflicts with other defines (Shuah Khan)
431 - [51c72e7] snmp: turn the "try next OID" code block into a macro to avoid errors (Vincent Bernat)
432 - [a2606ca] core: optimize BPF filter (Vincent Bernat)
433 - [ab2d1c1] configure: check more SNMP stuff. (Vincent Bernat)
434 - [3bfd57f] Whitelisted driver is not a very informative information. Remove it. (Vincent Bernat)
435 - [1093563] Add a whitelist for some drivers (currently: dsa and veth) (Vincent Bernat)
436 - [683b171] Don't send MFS equal to 0. (Vincent Bernat)
437 - [edcce8c] cdp: send native VLAN only with CDPv2 (Vincent Bernat)
438 - [2a19e9e] cdp: send native VLAN TLV (Vincent Bernat)
439 - [aff85bf] cdp: allow reception of native vlan (Vincent Bernat)
440 - [de4092b] /trabmission/tranmission/ (Christopher Johnston)
441 - [dc5e2a1] Export TZ=/etc/localtime to fix timestamps. (Vincent Bernat)
442 - [21d89e7] Spelling corrections (Vincent Bernat)
485 - [ceb406ad5d4d] Next release for this branch is 0.5.6. (Vincent Bernat)
486 - [3b3a1960916d] Continuation of the previous patch. (Vincent Bernat)
487 - [58ebf59ee542] frame.h uses very generic memeber names that resusts in conflicts with other defines (Shuah Khan)
488 - [51c72e7202ae] snmp: turn the "try next OID" code block into a macro to avoid errors (Vincent Bernat)
489 - [a2606cac2d73] core: optimize BPF filter (Vincent Bernat)
490 - [ab2d1c1f1ffa] configure: check more SNMP stuff. (Vincent Bernat)
491 - [3bfd57f32cbf] Whitelisted driver is not a very informative information. Remove it. (Vincent Bernat)
492 - [10935633f43a] Add a whitelist for some drivers (currently: dsa and veth) (Vincent Bernat)
493 - [683b17107239] Don't send MFS equal to 0. (Vincent Bernat)
494 - [edcce8ce3b1a] cdp: send native VLAN only with CDPv2 (Vincent Bernat)
495 - [2a19e9ea23f5] cdp: send native VLAN TLV (Vincent Bernat)
496 - [aff85bf3b248] cdp: allow reception of native vlan (Vincent Bernat)
497 - [de4092b57aea] /trabmission/tranmission/ (Christopher Johnston)
498 - [dc5e2a1dbb0e] Export TZ=/etc/localtime to fix timestamps. (Vincent Bernat)
499 - [21d89e7d2119] Spelling corrections (Vincent Bernat)
443500
444501 0.5.5 [2011-11-06 10:24:28 +0100]:
445502
446 - [fbda1f9] Fix a missing semi colon. (Vincent Bernat)
447 - [cab1ed9] Prepare 0.5.5 release. (Vincent Bernat)
448 - [5abfffc] Extend whitelist with possibility to blacklist. (Vincent Bernat)
449 - [bf89e7e] Fix a segfault when neither /etc/os-release not lsb_release is available. (Vincent Bernat)
450 - [a881834] Don't pack struct hmsg since we are not able to do unaligned access on some archs. (Vincent Bernat)
451 - [0265b1e] dmi: only enable DMI for x86 platforms (Vincent Bernat)
452 - [55606d4] lldpd: Only grab DMI information once. (Vincent Bernat)
453 - [1066729] snmp: use a 16-bit checksum, not a 15-bit one. (Vincent Bernat)
454 - [fbb9dea] snmp: Dot1 PI support, contributed by Shuah Khan (Vincent Bernat)
455 - [dccc696] SNMP: Dot1 PPVID, PPVLAN and VLANID support, contributed by Shuah Khan (Vincent Bernat)
456 - [de5ce83] [check] Add length when encoding Dot1 PI TLV (Vincent Bernat)
457 - [bc99d79] IEEE 802.1 2005 TLV Unit tests (Shuah Khan)
458 - [f17501b] Add support of PPVID and PI in changelog (Vincent Bernat)
459 - [69de42c] [lldpctl] Fix PVID value when displaying VLANs. (Vincent Bernat)
460 - [48acfca] Some fixes for PPVID and PI. (Vincent Bernat)
461 - [5a9cb3d] [configure] Fix a typo in help message (Vincent Bernat)
462 - [9757bfb] IEEE 802.1 2005 TLV enhancement - PPVID and PI added (Shuah Khan)
463 - [676d46b] Fix - lldpd netsnmp sub-agent segfaults when null write_method is passed in (Shuah Khan)
464 - [84e0688] Fix key/value output was incorrect when an interface name contains a dot. (Vincent Bernat)
465 - [e193388] cdp: Add CDP_CAP_HOST to outgoing CDP packets (Vincent Bernat)
466 - [a9db9b4] lldpd: update software version to match man page (Dean Hamstead)
467 - [0a36d97] lldp: ensure that boolean values are really boolean (Vincent Bernat)
468 - [1262868] ifaddrs: remove unused variable (Vincent Bernat)
503 - [fbda1f9f672e] Fix a missing semi colon. (Vincent Bernat)
504 - [cab1ed92266b] Prepare 0.5.5 release. (Vincent Bernat)
505 - [5abfffc2ff65] Extend whitelist with possibility to blacklist. (Vincent Bernat)
506 - [bf89e7e06467] Fix a segfault when neither /etc/os-release not lsb_release is available. (Vincent Bernat)
507 - [a8818344897d] Don't pack struct hmsg since we are not able to do unaligned access on some archs. (Vincent Bernat)
508 - [0265b1e5bdb0] dmi: only enable DMI for x86 platforms (Vincent Bernat)
509 - [55606d4bf4a0] lldpd: Only grab DMI information once. (Vincent Bernat)
510 - [1066729b4f27] snmp: use a 16-bit checksum, not a 15-bit one. (Vincent Bernat)
511 - [fbb9deaa30a2] snmp: Dot1 PI support, contributed by Shuah Khan (Vincent Bernat)
512 - [dccc6964d2b4] SNMP: Dot1 PPVID, PPVLAN and VLANID support, contributed by Shuah Khan (Vincent Bernat)
513 - [de5ce8377899] [check] Add length when encoding Dot1 PI TLV (Vincent Bernat)
514 - [bc99d796ad6f] IEEE 802.1 2005 TLV Unit tests (Shuah Khan)
515 - [f17501b6de29] Add support of PPVID and PI in changelog (Vincent Bernat)
516 - [69de42c471c9] [lldpctl] Fix PVID value when displaying VLANs. (Vincent Bernat)
517 - [48acfcaf0861] Some fixes for PPVID and PI. (Vincent Bernat)
518 - [5a9cb3db451a] [configure] Fix a typo in help message (Vincent Bernat)
519 - [9757bfbcde09] IEEE 802.1 2005 TLV enhancement - PPVID and PI added (Shuah Khan)
520 - [676d46b92d29] Fix - lldpd netsnmp sub-agent segfaults when null write_method is passed in (Shuah Khan)
521 - [84e06882c89c] Fix key/value output was incorrect when an interface name contains a dot. (Vincent Bernat)
522 - [e1933880be0d] cdp: Add CDP_CAP_HOST to outgoing CDP packets (Vincent Bernat)
523 - [a9db9b440e10] lldpd: update software version to match man page (Dean Hamstead)
524 - [0a36d97b918c] lldp: ensure that boolean values are really boolean (Vincent Bernat)
525 - [126286825f6e] ifaddrs: remove unused variable (Vincent Bernat)
469526
470527 0.5.4 [2011-07-02 20:09:58 +0200]:
471528
472 - [c06e113] Release 0.5.4. (Vincent Bernat)
473 - [ba85f9f] Add a way to specify which interfaces lldpd should listen to. (Vincent Bernat)
474 - [195bb7a] README is now README.md. Update Makefile.am. (Vincent Bernat)
475 - [5f415bc] Remove an unused variable. (Vincent Bernat)
476 - [e02afca] Add changelog entry for use of /etc/os-release (Vincent Bernat)
477 - [ae87586] Add support to read /etc/os-release for system information. (Michael Tremer)
478 - [5143412] Update ISC license wording. (Vincent Bernat)
479 - [00402c7] Translate README into its markdown equivalent (Vincent Bernat)
480 - [f226ec5] Suppress a new warning from GCC 4.5 (unused value). (Vincent Bernat)
481 - [09721cc] Move 802.3af/802.3at changelog entry in the appropriate section. (Vincent Bernat)
482 - [608cb51] Add support for 802.3at. (Vincent Bernat)
483 - [5ee26cb] Add changelog entries about 802.3af/Dot3 POE-MDI support. (Vincent Bernat)
484 - [42ee738] Allow to set Dot3 POE-MDI TLV from lldpctl. (Vincent Bernat)
485 - [befbdf8] Add initial Dot3/802.3at support (Vincent Bernat)
486 - [3fd015c] Move Dot3 MAC/Phy stuff into a separate structure. (Vincent Bernat)
487 - [05eacc7] Allow root to change configuration of lldpd when lldpctl has suid set (Vincent Bernat)
529 - [c06e1135e27f] Release 0.5.4. (Vincent Bernat)
530 - [ba85f9f40055] Add a way to specify which interfaces lldpd should listen to. (Vincent Bernat)
531 - [195bb7a9c430] README is now README.md. Update Makefile.am. (Vincent Bernat)
532 - [5f415bc72ea1] Remove an unused variable. (Vincent Bernat)
533 - [e02afca4ee65] Add changelog entry for use of /etc/os-release (Vincent Bernat)
534 - [ae87586a12ea] Add support to read /etc/os-release for system information. (Michael Tremer)
535 - [514341259194] Update ISC license wording. (Vincent Bernat)
536 - [00402c76dc26] Translate README into its markdown equivalent (Vincent Bernat)
537 - [f226ec5da741] Suppress a new warning from GCC 4.5 (unused value). (Vincent Bernat)
538 - [09721cce9a9e] Move 802.3af/802.3at changelog entry in the appropriate section. (Vincent Bernat)
539 - [608cb51caa7d] Add support for 802.3at. (Vincent Bernat)
540 - [5ee26cbadd30] Add changelog entries about 802.3af/Dot3 POE-MDI support. (Vincent Bernat)
541 - [42ee7382e54a] Allow to set Dot3 POE-MDI TLV from lldpctl. (Vincent Bernat)
542 - [befbdf892b0e] Add initial Dot3/802.3at support (Vincent Bernat)
543 - [3fd015c03942] Move Dot3 MAC/Phy stuff into a separate structure. (Vincent Bernat)
544 - [05eacc7ad702] Allow root to change configuration of lldpd when lldpctl has suid set (Vincent Bernat)
488545
489546 0.5.2 [2010-10-09 16:57:45 +0200]:
490547
491 - [edbf114] Prepare for release (0.5.2). (Vincent Bernat)
492 - [33aa26d] Add AM_MAINTAINER_MODE macro to configure.ac. (Vincent Bernat)
493 - [3e549e5] Add autogen.sh from buildconf. (Vincent Bernat)
494 - [5e64a80] Add receive-only mode switch "-r" to usage() (Vincent Bernat)
495 - [537a804] Add a receive-only mode with "-r" switch. (Vincent Bernat)
496 - [6b41bbd] Hide unwanted remote ports just after receiving information about them. (Vincent Bernat)
497 - [8482abe] More flexible smart mode and new default. (Vincent Bernat)
498 - [afcb570] Fix AX_CFLAGS_GCC_OPTION to make it work with autoconf 2.67. (Vincent Bernat)
499 - [e5c5ae4] Patch to keep wifi and bridge cap when updating chassis. (Vincent Bernat)
500 - [a37f8fd] Harden lldpd with the use of RELRO and NOW linker options. (Vincent Bernat)
501 - [9783649] Reenable SNMP support on Fedora 13. (Vincent Bernat)
502 - [d287953] [lldpctl] Fix a spelling error (Vincent Bernat)
503 - [93d2504] Sync Debian packaging with official packaging. (Vincent Bernat)
504 - [8e55586] Provide an initscript targetted at SuSE. (Vincent Bernat)
505 - [d4eaf17] Avoid linking lldpd to libxml2 and lldpctl to libnetsnmp. (Vincent Bernat)
506 - [ee979e2] net-snmp/agent/utils_func.h header is useless in agent_priv.c (Vincent Bernat)
507 - [053d997] Fix compilation with RHEL 5. (Vincent Bernat)
508 - [d623a64] Fix .spec for SuSE. (Vincent Bernat)
509 - [7b166df] Fix compilation on RHEL and Fedora 13. (Vincent Bernat)
510 - [2ceb9bb] Be compatible with RHEL4. (Vincent Bernat)
548 - [edbf114ebe30] Prepare for release (0.5.2). (Vincent Bernat)
549 - [33aa26d093e0] Add AM_MAINTAINER_MODE macro to configure.ac. (Vincent Bernat)
550 - [3e549e5276dc] Add autogen.sh from buildconf. (Vincent Bernat)
551 - [5e64a80e0c5b] Add receive-only mode switch "-r" to usage() (Vincent Bernat)
552 - [537a8043c831] Add a receive-only mode with "-r" switch. (Vincent Bernat)
553 - [6b41bbd35d40] Hide unwanted remote ports just after receiving information about them. (Vincent Bernat)
554 - [8482abe91c08] More flexible smart mode and new default. (Vincent Bernat)
555 - [afcb570e8bad] Fix AX_CFLAGS_GCC_OPTION to make it work with autoconf 2.67. (Vincent Bernat)
556 - [e5c5ae41249f] Patch to keep wifi and bridge cap when updating chassis. (Vincent Bernat)
557 - [a37f8fd665f3] Harden lldpd with the use of RELRO and NOW linker options. (Vincent Bernat)
558 - [978364976bae] Reenable SNMP support on Fedora 13. (Vincent Bernat)
559 - [d2879532e899] [lldpctl] Fix a spelling error (Vincent Bernat)
560 - [93d25046b36b] Sync Debian packaging with official packaging. (Vincent Bernat)
561 - [8e555861641d] Provide an initscript targetted at SuSE. (Vincent Bernat)
562 - [d4eaf172a79a] Avoid linking lldpd to libxml2 and lldpctl to libnetsnmp. (Vincent Bernat)
563 - [ee979e27b31b] net-snmp/agent/utils_func.h header is useless in agent_priv.c (Vincent Bernat)
564 - [053d99780e66] Fix compilation with RHEL 5. (Vincent Bernat)
565 - [d623a64a778a] Fix .spec for SuSE. (Vincent Bernat)
566 - [7b166df3350d] Fix compilation on RHEL and Fedora 13. (Vincent Bernat)
567 - [2ceb9bb73659] Be compatible with RHEL4. (Vincent Bernat)
511568
512569 0.5.1 [2010-06-10 17:09:03 +0200]:
513570
514 - [445cc33] Prepare for release. (Vincent Bernat)
515 - [42b3948] Add smart mode support. (Vincent Bernat)
516 - [ea67aa3] Revert "configure: try to use -Wl,--as-needed if possible" (Vincent Bernat)
517 - [24f27a9] Add prototype for lldpd_get_lsb_release(). (Vincent Bernat)
518 - [abcbb82] Group together related configuration information. (Vincent Bernat)
519 - [c036b15] If available, use the output of lsb_release for system description. (Vincent Bernat)
520 - [4ea5080] Don't check CDP checksums. (Vincent Bernat)
521 - [4969720] Listen on VLAN using an appropriate BPF filter and VLAN decapsulation. (Vincent Bernat)
522 - [0dced95] Remove "listen on VLAN" feature. (Vincent Bernat)
523 - [01b911b] configure: try to use -Wl,--as-needed if possible (Vincent Bernat)
524 - [20ffcb8] lldpd.spec: requires openssl since it is required by net-snmp (Vincent Bernat)
525 - [44cd2be] Make AM_SILENT_RULES optional. (Vincent Bernat)
526 - [06db360] Fix additional alignment issues for ARM platform. (Vincent Bernat)
527 - [dd09828] Fix an unaligned access when chassis ID is an IP address. (Vincent Bernat)
528 - [2d2f913] Fix AC_CHECK_DECLS macro in configure.ac (Vincent Bernat)
529 - [18c13fa] Don't try to guess FD_SETSIZE correct value when cross-compiling. (Vincent Bernat)
530 - [5b3214a] Revert "Blacklist VMWare interfaces (as per ticket #40)." (Vincent Bernat)
531 - [91eb6d5] Blacklist VMWare interfaces (as per ticket #40). (Vincent Bernat)
532 - [58fe612] Ignore interfaces with no queue. (Vincent Bernat)
533 - [fde7a7c] Typo in usage string of lldpd (Vincent Bernat)
534 - [0765b92] Add an entry to the manual page for -S option. (Vincent Bernat)
535 - [40ce835] Add -S <system_description> override. (Stig Thormodsrud)
536 - [999509a] Add a new output for lldpctl: keyvalue. (Vincent Bernat)
537 - [8e44f2d] Add SNMP support of lldpXMedPoE stuff. (Vincent Bernat)
538 - [4c0d271] List MDI/PSE and MDI/PD as an available LLDP-MED capability for the chassis. (Vincent Bernat)
539 - [a711a82] Update unittests for LLDP-MED POE-MDI TLV. (Vincent Bernat)
540 - [0d60628] Add a CHANGELOG entry about setting LLDP-MED POE-MDI from lldpctl. (Vincent Bernat)
541 - [009ddd2] Allow to set LLDP-MED POE-MDI TLV from lldpctl. (Vincent Bernat)
542 - [6d08df0] Move LLDP-MED POE stuff into a dedicated structure. (Vincent Bernat)
543 - [1dcd466] Add SNMP support for lldpXMedRemLocationTable. (Vincent Bernat)
544 - [83b86bb] Merge branch '38-lldpmed-network-policy' (Vincent Bernat)
545 - [fd6aa9a] Add SNMP support for lldpXMedLocMediaPolicyTable. (Vincent Bernat)
546 - [fdbe55a] Ensure that documentation is installed in the right place. (Vincent Bernat)
547 - [cefbc41] Fix installation of CHANGELOG file in lldpd.spec. (Vincent Bernat)
548 - [d814168] Adapt unittests to consider LLDP-MED network policy TLV. (Vincent Bernat)
549 - [40d6a8d] Add proper credit in CHANGELOG for network policy. (Vincent Bernat)
550 - [858df54] Add a CHANGELOG entry about setting network policy from lldpctl. (Vincent Bernat)
551 - [b258db5] Allow lldpctl to set both location and policy at the same time. (Vincent Bernat)
552 - [86f24df] Allow to set LLDP-MED network policy TLV from lldpctl. (Vincent Bernat)
553 - [93108f7] Initialize changelog for 0.5.1. (Vincent Bernat)
554 - [630b413] Fix hang issue in select() loop with SNMP. (Vincent Bernat)
555 - [0c877af] Allow to force a protocol. (Vincent Bernat)
556 - [b162b74] Add specifically a "-h" switch for lldpd and lldpctl (Vincent Bernat)
557 - [a8d659b] Add "format" option. (Vincent Bernat)
558 - [8347587] Use some conditionals to display some command line options. (Vincent Bernat)
559 - [5313261] Add a summary of available options in usage() of lldpd and lldpctl (Vincent Bernat)
571 - [445cc3360175] Prepare for release. (Vincent Bernat)
572 - [42b39485ea61] Add smart mode support. (Vincent Bernat)
573 - [ea67aa3f120a] Revert "configure: try to use -Wl,--as-needed if possible" (Vincent Bernat)
574 - [24f27a98b963] Add prototype for lldpd_get_lsb_release(). (Vincent Bernat)
575 - [abcbb8205d2d] Group together related configuration information. (Vincent Bernat)
576 - [c036b15d68ec] If available, use the output of lsb_release for system description. (Vincent Bernat)
577 - [4ea508095301] Don't check CDP checksums. (Vincent Bernat)
578 - [4969720835ba] Listen on VLAN using an appropriate BPF filter and VLAN decapsulation. (Vincent Bernat)
579 - [0dced9547193] Remove "listen on VLAN" feature. (Vincent Bernat)
580 - [01b911bccfa2] configure: try to use -Wl,--as-needed if possible (Vincent Bernat)
581 - [20ffcb8e5e37] lldpd.spec: requires openssl since it is required by net-snmp (Vincent Bernat)
582 - [44cd2bed8ee0] Make AM_SILENT_RULES optional. (Vincent Bernat)
583 - [06db36081491] Fix additional alignment issues for ARM platform. (Vincent Bernat)
584 - [dd098289040b] Fix an unaligned access when chassis ID is an IP address. (Vincent Bernat)
585 - [2d2f913b8d83] Fix AC_CHECK_DECLS macro in configure.ac (Vincent Bernat)
586 - [18c13faa4202] Don't try to guess FD_SETSIZE correct value when cross-compiling. (Vincent Bernat)
587 - [5b3214aabd81] Revert "Blacklist VMWare interfaces (as per ticket #40)." (Vincent Bernat)
588 - [91eb6d5df809] Blacklist VMWare interfaces (as per ticket #40). (Vincent Bernat)
589 - [58fe61281715] Ignore interfaces with no queue. (Vincent Bernat)
590 - [fde7a7ce13b5] Typo in usage string of lldpd (Vincent Bernat)
591 - [0765b92dd357] Add an entry to the manual page for -S option. (Vincent Bernat)
592 - [40ce835b083c] Add -S <system_description> override. (Stig Thormodsrud)
593 - [999509a3bdf6] Add a new output for lldpctl: keyvalue. (Vincent Bernat)
594 - [8e44f2dca1e8] Add SNMP support of lldpXMedPoE stuff. (Vincent Bernat)
595 - [4c0d271570c4] List MDI/PSE and MDI/PD as an available LLDP-MED capability for the chassis. (Vincent Bernat)
596 - [a711a821317d] Update unittests for LLDP-MED POE-MDI TLV. (Vincent Bernat)
597 - [0d6062891f66] Add a CHANGELOG entry about setting LLDP-MED POE-MDI from lldpctl. (Vincent Bernat)
598 - [009ddd234e6e] Allow to set LLDP-MED POE-MDI TLV from lldpctl. (Vincent Bernat)
599 - [6d08df0e25d0] Move LLDP-MED POE stuff into a dedicated structure. (Vincent Bernat)
600 - [1dcd46651f69] Add SNMP support for lldpXMedRemLocationTable. (Vincent Bernat)
601 - [83b86bbdfd83] Merge branch '38-lldpmed-network-policy' (Vincent Bernat)
602 - [fd6aa9a3331b] Add SNMP support for lldpXMedLocMediaPolicyTable. (Vincent Bernat)
603 - [fdbe55a6c1d7] Ensure that documentation is installed in the right place. (Vincent Bernat)
604 - [cefbc419479e] Fix installation of CHANGELOG file in lldpd.spec. (Vincent Bernat)
605 - [d8141686d862] Adapt unittests to consider LLDP-MED network policy TLV. (Vincent Bernat)
606 - [40d6a8d28719] Add proper credit in CHANGELOG for network policy. (Vincent Bernat)
607 - [858df54cb603] Add a CHANGELOG entry about setting network policy from lldpctl. (Vincent Bernat)
608 - [b258db587f3e] Allow lldpctl to set both location and policy at the same time. (Vincent Bernat)
609 - [86f24df3359c] Allow to set LLDP-MED network policy TLV from lldpctl. (Vincent Bernat)
610 - [93108f71542c] Initialize changelog for 0.5.1. (Vincent Bernat)
611 - [630b4134e8ca] Fix hang issue in select() loop with SNMP. (Vincent Bernat)
612 - [0c877af0a363] Allow to force a protocol. (Vincent Bernat)
613 - [b162b740d17a] Add specifically a "-h" switch for lldpd and lldpctl (Vincent Bernat)
614 - [a8d659bd15b0] Add "format" option. (Vincent Bernat)
615 - [8347587da1c2] Use some conditionals to display some command line options. (Vincent Bernat)
616 - [531326167f0d] Add a summary of available options in usage() of lldpd and lldpctl (Vincent Bernat)
560617
561618 0.5.0 [2010-03-13 22:18:03 +0100]:
562619
563 - [c8851c7] Update README with the latest information (Vincent Bernat)
564 - [7966933] After displaying PVID, close the section tag. (Vincent Bernat)
565 - [c3bab3e] Add XML support for Redhat as well. (Vincent Bernat)
566 - [0c39338] Compile with XML enabled for Debian. (Vincent Bernat)
567 - [aadc993] Remove unused chassis in lldpd_cleanup() instead of lldpd_port_cleanup(). (Vincent Bernat)
568 - [bc598c2] Retrieve FD_SETSIZE in a sane environment. (Vincent Bernat)
569 - [9df5ec3] Increase refcount of the local chassis when a new port is created. (Vincent Bernat)
570 - [4f60204] Add a CHANGELOG entry for XML output functionality. (Vincent)
571 - [a1c57ef] Fix wrong age display. (Andreas Hofmeister)
572 - [95e3bdf] Use LLOG_WARNX in xml_writer.c and remove superfluous newlines. (Andreas Hofmeister)
573 - [3822145] Add the text output label as "label" attribute to all xml elements. (Andreas Hofmeister)
574 - [3c26500] Fix error handling in location data. (Andreas Hofmeister)
575 - [1480ce7] Implement an XML writer. (Andreas Hofmeister)
576 - [f4d33e6] Implement a basic "writer" infrastructure to emit structured text. (Andreas Hofmeister)
577 - [2e1ea85] Rip display related stuff out of lldpctl and put into display.c (Andreas Hofmeister)
578 - [72c0038] Avoid dereferencing a type-punned pointer. (Vincent)
579 - [9898ac0] Free unused chassis. (Vincent)
580 - [a0aa43e] Don't listen/send LLDP packets on bridge. (Vincent)
581 - [8c37e19] Do not require libtool 2.2 (Andreas Hofmeister)
582 - [9a784fd] Make lldpctl refuse attempts to change anything when running setuid. (Andreas Hofmeister)
583 - [f5bc67e] Fix autoconf complains about libtool. (Andreas Hofmeister)
584 - [740d517] Add a manual page for the new -X option. (Vincent)
585 - [bbea66e] Allow to specify the AgentX socket to use (instead of the default one). (Vincent)
586 - [ed1e792] Ensure that umask is set at a sensible value before building the chroot. (Vincent)
587 - [c0ce5d1] For Redhat, adapt init.d script to initialize the chroot. (Vincent)
588 - [9a79e6d] For Debian init.d, build the chroot before starting the daemon. (Vincent Bernat)
589 - [53c653e] Change handling of conditional builds in the spec file (Peter Kjellström)
590 - [55d3f2f] Merge branch '30-vlanid-without-name' (Vincent Bernat)
591 - [77c4d9d] Don't set MFS with MTU value. (Vincent Bernat)
592 - [be1f745] Display PVID even when we don't know its name. (Vincent Bernat)
593 - [5bbe5fd] Cope with Port VLAN ID but no VLAN names. (Vincent Bernat)
594 - [915dc28] Make netsnmp headers compatible with C99. (Vincent Bernat)
595 - [fa835fd] Make lldpctl display the age of displayed information. (Vincent Bernat)
596 - [45e89c8] Add some additional GCC options by default. (Vincent Bernat)
597 - [4b9a5a2] Get timezone info before being in the chroot. (Vincent Bernat)
598 - [2bd9c1c] Fix file descriptor leak when enabling "listen on VLAN" feature (Vincent Bernat)
599 - [0d86e62] Reset "sent" flag for each port when sending. (Vincent Bernat)
600 - [0bded85] Update CHANGELOG to reflect recent feature merges. (Vincent Bernat)
601 - [b7eb76b] Add CHANGELOG from 0.4.1. (Vincent Bernat)
602 - [cefe8d0] Merge branch '15-old-compat' (Vincent Bernat)
603 - [114d1d3] Also ship CHANGELOG file (Vincent Bernat)
604 - [3509770] Define ioctl for VLAN and bond. (Vincent Bernat)
605 - [8f88ff7] Fix some warnings about incompatible pointer types. (Vincent Bernat)
606 - [8e4b903] Save cache at various points of configure script. (Vincent Bernat)
607 - [b56625e] linux/filter.h may need linux/types on old systems. (Vincent Bernat)
608 - [6bb9c4e] Add support for libc not defining __progname symbol. (Vincent Bernat)
609 - [d38eae2] Rework autoconf stuff. (Vincent Bernat)
610 - [f0824c4] Fix some warnings in tests. (Vincent Bernat)
611 - [91a36ce] Include manual pages into distribution. (Vincent Bernat)
612 - [6f1046d] Use "void" instead of empty parameter list for function prototypes. (Vincent Bernat)
613 - [8e544ee] Use libtool convenience libraries for common files for lldpd and lldpctl. (Vincent Bernat)
614 - [f0bd350] Replace index() by strchr() (Vincent Bernat)
615 - [f4ed5af] When SYSFS_BRIDGE_* stuff does not exist, just use old /proc. (Vincent Bernat)
616 - [563e2df] Compatibility with gcc 2.95.x: add spaces around __VA__ARGS__ (Vincent Bernat)
617 - [f2af17b] More ethtool compatibility (Vincent Bernat)
618 - [b5c7ce8] Compilation fix for ancient gcc. (Vincent Bernat)
619 - [de1b1b3] Add '-k' flag to disable kernel version advertising. (Vincent Bernat)
620 - [b9f4c12] Bridge ioctls cannot be used with a 32bit userland on a 64bit kernel. (Vincent Bernat)
621 - [5869524] Fix LSB header in provided Debian init.d script. (Vincent Bernat)
622 - [e51da5e] Add missing argument in some call to LLOG_INFO in lldp.c. (Vincent Bernat)
623 - [4b70c53] Do not include <ifaddrs.h> since we want to replace it. (Vincent Bernat)
624 - [9b9b31b] Provide another getifaddrs implementation, stolen from USAGI project (Vincent Bernat)
625 - [b799752] Add getifaddrs() replacement for system without it. (Vincent Bernat)
626 - [4e26d88] Remove *.pcap file on clean. (Vincent Bernat)
627 - [d02bb46] Add unit tests for EDP (Vincent Bernat)
628 - [5aa86a4] Add SONMP unit tests. (Vincent Bernat)
629 - [e947420] Add CDP unit tests. (Vincent Bernat)
630 - [4dc6101] Move pcap stuff into a separate file to allow sharing with future tests. (Vincent Bernat)
631 - [3137529] Disable some tests when some features (dot1, dot3, lldpmed) are not enabled. (Vincent Bernat)
632 - [9360858] fail_* macros do not break execution flow. (Vincent Bernat)
633 - [654f624] Add LLDP receive tests (Vincent Bernat)
634 - [fedf4d7] Add LLDP send tests. (Vincent Bernat)
635 - [9d0a8a8] Add unit tests for lists packing/unpacking. (Vincent Bernat)
636 - [2acc141] Unit tests for packing/unpacking. (Vincent Bernat)
637 - [72dc524] Update signature of transport string function for SNMP. (Vincent Bernat)
638 - [a8db600] Fix bug in CDP packet generation: CDP version was always 1. (Vincent Bernat)
639 - [7a00807] Fix compilation issues when DOT1 or DOT3 are not enabled. (Vincent Bernat)
640 - [f8cb50f] Fix comment of iface_port_name_desc() (Vincent Bernat)
641 - [36bd79e] Use ifAlias from newer Linux kernels if available. (Vincent Bernat)
642 - [44002d6] Set h_ifindex correctly. (Vincent Bernat)
643 - [77d7090] Add a callback mechanism to watch for incoming data on sockets. (Vincent Bernat)
644 - [692fe9b] Add a note about EDP in changelog. (Vincent Bernat)
645 - [775d49a] Update changelog. (Vincent Bernat)
646 - [993a6e5] Make "listen on vlan" feature optional at compile-time. (Vincent Bernat)
647 - [cfe00f7] There are duplicate in the list of address we give to handler functions. We need to acknowledge this correctly. (Vincent Bernat)
648 - [6a2fa59] Add back "listen on VLAN" feature. (Vincent Bernat)
649 - [5994b27] One VLAN can be associated to multiple interfaces through bridge or bond. Handle those cases appropriately. (Vincent Bernat)
650 - [849954d] Add back support for bonding using the new architecture. (Vincent Bernat)
651 - [4e624dc] Don't free statically allocated port. (Vincent Bernat)
652 - [6e75df8] Change the way interface information are collected. (Vincent Bernat)
653 - [16f910e] Move chassis update to a function. (Vincent Bernat)
654 - [7a53c5b] Fix SNMP support to handle multiple systems on the same port. (Vincent Bernat)
655 - [62c126a] Fix support for EDP with respect to multisystem support. EDP VLAN are transmitted in another VLAN and therefore need to be attached to the right existing system. (Vincent Bernat)
656 - [f4c4390] Add some debug output to track know remote systems/ports. (Vincent Bernat)
657 - [84853b9] Adapt lldpctl to display received systems for each port. (Vincent Bernat)
658 - [77507b6] Handle reception of several different systems on each port. (Vincent Bernat)
659 - [7506872] Update lldpd.h to support a list of remote systems. (Vincent Bernat)
660 - [f2dcb18] Simplify multiprotocols handling. Remove probing. This is not very usable for now but this will be enhanced when we will support multiple systems on the same port. (Vincent Bernat)
661 - [0bc3294] Suppress bond handling. This will be done in another way later. (Vincent Bernat)
662 - [71936c6] Suppress "listen on vlan" feature. This will be reimplemented later in a more generic way. (Vincent Bernat)
663 - [42bddd4] When LLDP-MED is not enabled, do not send inventory. (Vincent Bernat)
664 - [ef76f92] Keep gcc happy with 'const' keyword. With optimization -O0, gcc seems to handle more carefully 'const' keyword. (Vincent Bernat)
665 - [98faedc] Use chassis ID when sending EDP packets. (Vincent Bernat)
666 - [7c11435] Fix EDP vlan handling when there is no VLAN (Vincent Bernat)
667 - [46daea6] Remove misc/ directory. This directory is old junk code. (Vincent Bernat)
668 - [777c32e] Fix the case where last change < start time. This case can happen if the master agent is restarted: lldpd last change will be before the start of the master agent. (Vincent Bernat)
669 - [2681915] Adapt .spec file to work with actual tar.gz. lldpd.init and lldpd.sysconfig should be shipped into src.rpm package. (Vincent Bernat)
620 - [c8851c73b1f7] Update README with the latest information (Vincent Bernat)
621 - [7966933d3ff4] After displaying PVID, close the section tag. (Vincent Bernat)
622 - [c3bab3edcb8e] Add XML support for Redhat as well. (Vincent Bernat)
623 - [0c39338e283e] Compile with XML enabled for Debian. (Vincent Bernat)
624 - [aadc99360ba5] Remove unused chassis in lldpd_cleanup() instead of lldpd_port_cleanup(). (Vincent Bernat)
625 - [bc598c23dc61] Retrieve FD_SETSIZE in a sane environment. (Vincent Bernat)
626 - [9df5ec3d7836] Increase refcount of the local chassis when a new port is created. (Vincent Bernat)
627 - [4f6020424f33] Add a CHANGELOG entry for XML output functionality. (Vincent)
628 - [a1c57ef29aca] Fix wrong age display. (Andreas Hofmeister)
629 - [95e3bdf5fd03] Use LLOG_WARNX in xml_writer.c and remove superfluous newlines. (Andreas Hofmeister)
630 - [3822145901cc] Add the text output label as "label" attribute to all xml elements. (Andreas Hofmeister)
631 - [3c26500bef4f] Fix error handling in location data. (Andreas Hofmeister)
632 - [1480ce745f23] Implement an XML writer. (Andreas Hofmeister)
633 - [f4d33e6bf103] Implement a basic "writer" infrastructure to emit structured text. (Andreas Hofmeister)
634 - [2e1ea85060c7] Rip display related stuff out of lldpctl and put into display.c (Andreas Hofmeister)
635 - [72c00381999c] Avoid dereferencing a type-punned pointer. (Vincent)
636 - [9898ac078def] Free unused chassis. (Vincent)
637 - [a0aa43e90db3] Don't listen/send LLDP packets on bridge. (Vincent)
638 - [8c37e19aa948] Do not require libtool 2.2 (Andreas Hofmeister)
639 - [9a784fd2a506] Make lldpctl refuse attempts to change anything when running setuid. (Andreas Hofmeister)
640 - [f5bc67eecf3e] Fix autoconf complains about libtool. (Andreas Hofmeister)
641 - [740d517e1fd0] Add a manual page for the new -X option. (Vincent)
642 - [bbea66e1caeb] Allow to specify the AgentX socket to use (instead of the default one). (Vincent)
643 - [ed1e79270d94] Ensure that umask is set at a sensible value before building the chroot. (Vincent)
644 - [c0ce5d1a2aee] For Redhat, adapt init.d script to initialize the chroot. (Vincent)
645 - [9a79e6d59327] For Debian init.d, build the chroot before starting the daemon. (Vincent Bernat)
646 - [53c653ea7e2f] Change handling of conditional builds in the spec file (Peter Kjellström)
647 - [55d3f2f40f1f] Merge branch '30-vlanid-without-name' (Vincent Bernat)
648 - [77c4d9d0fdf9] Don't set MFS with MTU value. (Vincent Bernat)
649 - [be1f74526a8f] Display PVID even when we don't know its name. (Vincent Bernat)
650 - [5bbe5fd0bb33] Cope with Port VLAN ID but no VLAN names. (Vincent Bernat)
651 - [915dc28b79c1] Make netsnmp headers compatible with C99. (Vincent Bernat)
652 - [fa835fd55383] Make lldpctl display the age of displayed information. (Vincent Bernat)
653 - [45e89c8c483d] Add some additional GCC options by default. (Vincent Bernat)
654 - [4b9a5a2384c8] Get timezone info before being in the chroot. (Vincent Bernat)
655 - [2bd9c1c90069] Fix file descriptor leak when enabling "listen on VLAN" feature (Vincent Bernat)
656 - [0d86e62fcff0] Reset "sent" flag for each port when sending. (Vincent Bernat)
657 - [0bded8580cf7] Update CHANGELOG to reflect recent feature merges. (Vincent Bernat)
658 - [b7eb76b70f92] Add CHANGELOG from 0.4.1. (Vincent Bernat)
659 - [cefe8d058597] Merge branch '15-old-compat' (Vincent Bernat)
660 - [114d1d31f635] Also ship CHANGELOG file (Vincent Bernat)
661 - [35097709fa3f] Define ioctl for VLAN and bond. (Vincent Bernat)
662 - [8f88ff70535d] Fix some warnings about incompatible pointer types. (Vincent Bernat)
663 - [8e4b9031d9e3] Save cache at various points of configure script. (Vincent Bernat)
664 - [b56625e6d81d] linux/filter.h may need linux/types on old systems. (Vincent Bernat)
665 - [6bb9c4e01fd8] Add support for libc not defining __progname symbol. (Vincent Bernat)
666 - [d38eae28a90e] Rework autoconf stuff. (Vincent Bernat)
667 - [f0824c4aa5ec] Fix some warnings in tests. (Vincent Bernat)
668 - [91a36cea4b32] Include manual pages into distribution. (Vincent Bernat)
669 - [6f1046d1b9ee] Use "void" instead of empty parameter list for function prototypes. (Vincent Bernat)
670 - [8e544ee42e4e] Use libtool convenience libraries for common files for lldpd and lldpctl. (Vincent Bernat)
671 - [f0bd3505f46d] Replace index() by strchr() (Vincent Bernat)
672 - [f4ed5af17ba1] When SYSFS_BRIDGE_* stuff does not exist, just use old /proc. (Vincent Bernat)
673 - [563e2dfc9648] Compatibility with gcc 2.95.x: add spaces around __VA__ARGS__ (Vincent Bernat)
674 - [f2af17b36fd6] More ethtool compatibility (Vincent Bernat)
675 - [b5c7ce8d2c0a] Compilation fix for ancient gcc. (Vincent Bernat)
676 - [de1b1b3a2bcb] Add '-k' flag to disable kernel version advertising. (Vincent Bernat)
677 - [b9f4c12081cd] Bridge ioctls cannot be used with a 32bit userland on a 64bit kernel. (Vincent Bernat)
678 - [586952454aee] Fix LSB header in provided Debian init.d script. (Vincent Bernat)
679 - [e51da5ecd24d] Add missing argument in some call to LLOG_INFO in lldp.c. (Vincent Bernat)
680 - [4b70c539e3f4] Do not include <ifaddrs.h> since we want to replace it. (Vincent Bernat)
681 - [9b9b31beb950] Provide another getifaddrs implementation, stolen from USAGI project (Vincent Bernat)
682 - [b79975281ed6] Add getifaddrs() replacement for system without it. (Vincent Bernat)
683 - [4e26d88f8629] Remove *.pcap file on clean. (Vincent Bernat)
684 - [d02bb4614416] Add unit tests for EDP (Vincent Bernat)
685 - [5aa86a41befa] Add SONMP unit tests. (Vincent Bernat)
686 - [e94742074999] Add CDP unit tests. (Vincent Bernat)
687 - [4dc61015f57a] Move pcap stuff into a separate file to allow sharing with future tests. (Vincent Bernat)
688 - [31375299d19d] Disable some tests when some features (dot1, dot3, lldpmed) are not enabled. (Vincent Bernat)
689 - [9360858c8b83] fail_* macros do not break execution flow. (Vincent Bernat)
690 - [654f6246b3a6] Add LLDP receive tests (Vincent Bernat)
691 - [fedf4d777235] Add LLDP send tests. (Vincent Bernat)
692 - [9d0a8a89f425] Add unit tests for lists packing/unpacking. (Vincent Bernat)
693 - [2acc14181074] Unit tests for packing/unpacking. (Vincent Bernat)
694 - [72dc524ebdfc] Update signature of transport string function for SNMP. (Vincent Bernat)
695 - [a8db600793bb] Fix bug in CDP packet generation: CDP version was always 1. (Vincent Bernat)
696 - [7a00807502e7] Fix compilation issues when DOT1 or DOT3 are not enabled. (Vincent Bernat)
697 - [f8cb50faab34] Fix comment of iface_port_name_desc() (Vincent Bernat)
698 - [36bd79e367cd] Use ifAlias from newer Linux kernels if available. (Vincent Bernat)
699 - [44002d6615d6] Set h_ifindex correctly. (Vincent Bernat)
700 - [77d7090e199a] Add a callback mechanism to watch for incoming data on sockets. (Vincent Bernat)
701 - [692fe9bb4cee] Add a note about EDP in changelog. (Vincent Bernat)
702 - [775d49a0c45d] Update changelog. (Vincent Bernat)
703 - [993a6e50892d] Make "listen on vlan" feature optional at compile-time. (Vincent Bernat)
704 - [cfe00f7f1a5b] There are duplicate in the list of address we give to handler functions. We need to acknowledge this correctly. (Vincent Bernat)
705 - [6a2fa591c100] Add back "listen on VLAN" feature. (Vincent Bernat)
706 - [5994b27db0fd] One VLAN can be associated to multiple interfaces through bridge or bond. Handle those cases appropriately. (Vincent Bernat)
707 - [849954d702bf] Add back support for bonding using the new architecture. (Vincent Bernat)
708 - [4e624dc2f10a] Don't free statically allocated port. (Vincent Bernat)
709 - [6e75df87a63c] Change the way interface information are collected. (Vincent Bernat)
710 - [16f910e12fe3] Move chassis update to a function. (Vincent Bernat)
711 - [7a53c5b93838] Fix SNMP support to handle multiple systems on the same port. (Vincent Bernat)
712 - [62c126aae146] Fix support for EDP with respect to multisystem support. EDP VLAN are transmitted in another VLAN and therefore need to be attached to the right existing system. (Vincent Bernat)
713 - [f4c439022a95] Add some debug output to track know remote systems/ports. (Vincent Bernat)
714 - [84853b9208a7] Adapt lldpctl to display received systems for each port. (Vincent Bernat)
715 - [77507b697e3e] Handle reception of several different systems on each port. (Vincent Bernat)
716 - [750687244970] Update lldpd.h to support a list of remote systems. (Vincent Bernat)
717 - [f2dcb1804e2c] Simplify multiprotocols handling. Remove probing. This is not very usable for now but this will be enhanced when we will support multiple systems on the same port. (Vincent Bernat)
718 - [0bc32943e99b] Suppress bond handling. This will be done in another way later. (Vincent Bernat)
719 - [71936c67e6d4] Suppress "listen on vlan" feature. This will be reimplemented later in a more generic way. (Vincent Bernat)
720 - [42bddd41f66d] When LLDP-MED is not enabled, do not send inventory. (Vincent Bernat)
721 - [ef76f9200685] Keep gcc happy with 'const' keyword. With optimization -O0, gcc seems to handle more carefully 'const' keyword. (Vincent Bernat)
722 - [98faedcfe8ba] Use chassis ID when sending EDP packets. (Vincent Bernat)
723 - [7c11435e7fb8] Fix EDP vlan handling when there is no VLAN (Vincent Bernat)
724 - [46daea614362] Remove misc/ directory. This directory is old junk code. (Vincent Bernat)
725 - [777c32ead5a3] Fix the case where last change < start time. This case can happen if the master agent is restarted: lldpd last change will be before the start of the master agent. (Vincent Bernat)
726 - [268191540251] Adapt .spec file to work with actual tar.gz. lldpd.init and lldpd.sysconfig should be shipped into src.rpm package. (Vincent Bernat)
670727
671728 0.4.2 [2010-03-10 22:29:37 +0100]:
672729
673 - [1c8b2a4] Prepare 0.4.2 release (Vincent Bernat)
674 - [a01d4f8] Use chassis ID when sending EDP packets. (Vincent Bernat)
675 - [d7390a0] Bridge ioctls cannot be used with a 32bit userland on a 64bit kernel. (Vincent Bernat)
676 - [af41b46] Ensure that umask is set at a sensible value before building the chroot. (Vincent)
677 - [0d61197] For Redhat, adapt init.d script to initialize the chroot. (Vincent Bernat)
678 - [cd0f174] For Debian init.d, build the chroot before starting the daemon. (Vincent Bernat)
679 - [0dd62c8] Update changelog for future 0.4.2 version. (Vincent Bernat)
680 - [65727e4] Don't free statically allocated port. (Vincent Bernat)
730 - [1c8b2a471115] Prepare 0.4.2 release (Vincent Bernat)
731 - [a01d4f8c89f6] Use chassis ID when sending EDP packets. (Vincent Bernat)
732 - [d7390a085b56] Bridge ioctls cannot be used with a 32bit userland on a 64bit kernel. (Vincent Bernat)
733 - [af41b46ee95d] Ensure that umask is set at a sensible value before building the chroot. (Vincent)
734 - [0d611979150b] For Redhat, adapt init.d script to initialize the chroot. (Vincent Bernat)
735 - [cd0f174718ff] For Debian init.d, build the chroot before starting the daemon. (Vincent Bernat)
736 - [0dd62c81a47e] Update changelog for future 0.4.2 version. (Vincent Bernat)
737 - [65727e4a8f23] Don't free statically allocated port. (Vincent Bernat)
681738
682739 0.4.1 [2009-09-30 14:30:30 +0200]:
683740
684 - [a03e43a] Also ship CHANGELOG file (Vincent Bernat)
685 - [cf1ea20] Update changelog for 0.4.1. (Vincent Bernat)
686 - [fc4667f] Prepare 0.4.1 release. (Vincent Bernat)
687 - [6fa2869] Include manual pages into distribution. (Vincent Bernat)
688 - [c3bdd0d] Add missing argument in some call to LLOG_INFO in lldp.c. (Vincent Bernat)
689 - [be685f6] Fix bug in CDP packet generation: CDP version was always 1. (Vincent Bernat)
690 - [cd697ad] Fix EDP vlan handling when there is no VLAN (Vincent Bernat)
691 - [23d9c6b] Fix the case where last change < start time. This case can happen if the master agent is restarted: lldpd last change will be before the start of the master agent. (Vincent Bernat)
741 - [a03e43af9ae2] Also ship CHANGELOG file (Vincent Bernat)
742 - [cf1ea20a2db7] Update changelog for 0.4.1. (Vincent Bernat)
743 - [fc4667f0e8e6] Prepare 0.4.1 release. (Vincent Bernat)
744 - [6fa286928eac] Include manual pages into distribution. (Vincent Bernat)
745 - [c3bdd0d81a68] Add missing argument in some call to LLOG_INFO in lldp.c. (Vincent Bernat)
746 - [be685f6debbc] Fix bug in CDP packet generation: CDP version was always 1. (Vincent Bernat)
747 - [cd697ad19a8f] Fix EDP vlan handling when there is no VLAN (Vincent Bernat)
748 - [23d9c6bf9c79] Fix the case where last change < start time. This case can happen if the master agent is restarted: lldpd last change will be before the start of the master agent. (Vincent Bernat)
692749
693750 0.4.0 [2009-05-19 14:42:45 +0200]:
694751
695 - [accd4a6] Update version in configure.ac (Vincent Bernat)
696 - [4544484] If net-snmp/agent/struct.h does not exist, provide an empty one. (Vincent Bernat)
697 - [3d6585f] Add init script for RPM (Vincent Bernat)
698 - [edc4813] Enhance .spec. Enable SNMP support when building RPM. Create lldpd user/group. (Vincent Bernat)
699 - [0f6eb1e] Fix URL and description to match Debian package. (Vincent Bernat)
700 - [8053016] lldpd.spec for RPM package, contributed by Dean Hamstead. (Vincent Bernat)
701 - [bac9171] Also check for VLAN on bridges. (Vincent Bernat)
702 - [b29c23c] Some virtual ethernet interfaces do not have IFF_MULTICAST flag. We use them if they have at least the IFF_BROADCAST flag. This is useful for Xen Dom0 to get LLDP information from DomU. (Vincent Bernat)
703 - [a204514] Fix a parsing error for link aggregation TLV in LLDP (Vincent Bernat)
704 - [fe4a89d] Add missing frame.c (Vincent Bernat)
705 - [a0edeaf] When cleaning up a port in the context of refreshing gathered information, don't clean LLDP-MED location information. However, when cleaning up a port for removal, clean them. (Vincent Bernat)
706 - [bc08499] Fix LLDP-MED class type sending: it is 1 byte large, not 2. (Vincent Bernat)
707 - [3d1337f] Fix alignment issue that may appear when reading 64bit integers. (Vincent Bernat)
708 - [a8105c1] Major rewrite for packet builder and parser. (Vincent Bernat)
709 - [70d8fe9] Fix unaligned memory access in ctl.c using memcpy instead of pointer magic. This needs to be done on encoding/decoding too. (Vincent Bernat)
710 - [c933faf] Call res_init in case of failure to resolv names (Vincent Bernat)
752 - [accd4a6587b0] Update version in configure.ac (Vincent Bernat)
753 - [45444847259e] If net-snmp/agent/struct.h does not exist, provide an empty one. (Vincent Bernat)
754 - [3d6585f3ae56] Add init script for RPM (Vincent Bernat)
755 - [edc4813f73b5] Enhance .spec. Enable SNMP support when building RPM. Create lldpd user/group. (Vincent Bernat)
756 - [0f6eb1ee97a1] Fix URL and description to match Debian package. (Vincent Bernat)
757 - [80530161402b] lldpd.spec for RPM package, contributed by Dean Hamstead. (Vincent Bernat)
758 - [bac91719401f] Also check for VLAN on bridges. (Vincent Bernat)
759 - [b29c23cc9cb0] Some virtual ethernet interfaces do not have IFF_MULTICAST flag. We use them if they have at least the IFF_BROADCAST flag. This is useful for Xen Dom0 to get LLDP information from DomU. (Vincent Bernat)
760 - [a204514fa338] Fix a parsing error for link aggregation TLV in LLDP (Vincent Bernat)
761 - [fe4a89de3873] Add missing frame.c (Vincent Bernat)
762 - [a0edeaf8c46a] When cleaning up a port in the context of refreshing gathered information, don't clean LLDP-MED location information. However, when cleaning up a port for removal, clean them. (Vincent Bernat)
763 - [bc08499a5e18] Fix LLDP-MED class type sending: it is 1 byte large, not 2. (Vincent Bernat)
764 - [3d1337f37e8c] Fix alignment issue that may appear when reading 64bit integers. (Vincent Bernat)
765 - [a8105c1b10d0] Major rewrite for packet builder and parser. (Vincent Bernat)
766 - [70d8fe9813a0] Fix unaligned memory access in ctl.c using memcpy instead of pointer magic. This needs to be done on encoding/decoding too. (Vincent Bernat)
767 - [c933faf61396] Call res_init in case of failure to resolv names (Vincent Bernat)
711768
712769 0.3.3 [2009-03-08 16:52:54 +0100]:
713770
714 - [40a7221] Prepare release 0.3.3 with a patch backported from future 0.4. (Vincent Bernat)
715 - [17a6a18] When cleaning up a port in the context of refreshing gathered information, don't clean LLDP-MED location information. However, when cleaning up a port for removal, clean them. (Vincent Bernat)
771 - [40a7221cb407] Prepare release 0.3.3 with a patch backported from future 0.4. (Vincent Bernat)
772 - [17a6a18d7eb5] When cleaning up a port in the context of refreshing gathered information, don't clean LLDP-MED location information. However, when cleaning up a port for removal, clean them. (Vincent Bernat)
716773
717774 0.3.2 [2009-03-02 16:07:06 +0100]:
718775
719 - [34602f3] Fix lldpctl when LLDP-MED is enabled. Prepare new release. (Vincent Bernat)
720 - [a80ca69] Fix warning when compiling without LLDP-MED (Vincent Bernat)
776 - [34602f3b1cdd] Fix lldpctl when LLDP-MED is enabled. Prepare new release. (Vincent Bernat)
777 - [a80ca699de13] Fix warning when compiling without LLDP-MED (Vincent Bernat)
721778
722779 0.3.1 [2009-02-27 21:57:20 +0100]:
723780
724 - [d32c894] Prepare version 0.3.1 (Vincent Bernat)
725 - [b7c1b7c] Use memcpy instead of strlcpy when copying interface names to static buffers. (Vincent Bernat)
726 - [63f4b17] When refreshing port information, clean up existing information! (Vincent Bernat)
727 - [55d6336] Don't try to reset the interface when removing it (Vincent Bernat)
728 - [4f758bc] Fix double free for local ports (Vincent Bernat)
729 - [d243d47] Fix a memory leak that can happen when a port is removed or renamed (Vincent Bernat)
730 - [ec17217] Don't free c_med_sw for local chassis. It is allocated and freed elsewhere. (Vincent Bernat)
731 - [397dee6] Fix an error when reading LLDP-MED packet (Vincent Bernat)
732 - [517d524] Fix a memory leak when using LLDP-MED (Vincent Bernat)
733 - [44a843a] Lower log level for problem when getting bridge info (Vincent Bernat)
734 - [e70b76f] Also check if the interface is RUNNING before considering it active. (Vincent Bernat)
735 - [7d58de8] Merge branch 'master' of ssh://ace.luffy.cx/srv/git/lldpd (Vincent Bernat)
736 - [d1d9479] Fix compilation when SONMP and EDP are disabled (Vincent Bernat)
737 - [a15ddba] Don't output any warning when bridge support is not enabled at all. (Vincent Bernat)
738 - [9ec6b11] FDP seems to use a non-flawed checksum (Vincent Bernat)
739 - [6d07eae] Don't compile FDP stuff if not needed. (Vincent Bernat)
740 - [45e96f2] Fix lldpctl to display capability bit "Router" (Vincent Bernat)
741 - [bf51708] Handle FDP capabilities (Vincent Bernat)
742 - [8888d19] Use static for all not to be exported symbols (Vincent Bernat)
743 - [740593f] Move LLDP-MED location/policy to port instead of chassis. Handle setting of location in lldpctl instead of lldpd. (Vincent Bernat)
744 - [4b7f39b] Adding missing values for MAU type, thanks to James Lingard. (Vincent Bernat)
745 - [d2012fb] Fix compilation without EDP (Vincent Bernat)
746 - [75b3469] Handle reception and display of PVID (Vincent Bernat)
747 - [748e05d] This is maximum frame size, not MTU (Vincent Bernat)
748 - [548109b] Add Maximum Frame Size support. For Linux, we just use MTU as MFS. (Vincent Bernat)
781 - [d32c89440b0c] Prepare version 0.3.1 (Vincent Bernat)
782 - [b7c1b7c2433a] Use memcpy instead of strlcpy when copying interface names to static buffers. (Vincent Bernat)
783 - [63f4b177e9b9] When refreshing port information, clean up existing information! (Vincent Bernat)
784 - [55d63368c919] Don't try to reset the interface when removing it (Vincent Bernat)
785 - [4f758bc0080b] Fix double free for local ports (Vincent Bernat)
786 - [d243d47d6362] Fix a memory leak that can happen when a port is removed or renamed (Vincent Bernat)
787 - [ec1721712705] Don't free c_med_sw for local chassis. It is allocated and freed elsewhere. (Vincent Bernat)
788 - [397dee69ccda] Fix an error when reading LLDP-MED packet (Vincent Bernat)
789 - [517d524b6797] Fix a memory leak when using LLDP-MED (Vincent Bernat)
790 - [44a843aad9c2] Lower log level for problem when getting bridge info (Vincent Bernat)
791 - [e70b76f986e6] Also check if the interface is RUNNING before considering it active. (Vincent Bernat)
792 - [7d58de887e4b] Merge branch 'master' of ssh://ace.luffy.cx/srv/git/lldpd (Vincent Bernat)
793 - [d1d94791fd8a] Fix compilation when SONMP and EDP are disabled (Vincent Bernat)
794 - [a15ddba7e50e] Don't output any warning when bridge support is not enabled at all. (Vincent Bernat)
795 - [9ec6b11147c8] FDP seems to use a non-flawed checksum (Vincent Bernat)
796 - [6d07eaeed80c] Don't compile FDP stuff if not needed. (Vincent Bernat)
797 - [45e96f2e969c] Fix lldpctl to display capability bit "Router" (Vincent Bernat)
798 - [bf5170882f45] Handle FDP capabilities (Vincent Bernat)
799 - [8888d1917256] Use static for all not to be exported symbols (Vincent Bernat)
800 - [740593ff7475] Move LLDP-MED location/policy to port instead of chassis. Handle setting of location in lldpctl instead of lldpd. (Vincent Bernat)
801 - [4b7f39b1a3a8] Adding missing values for MAU type, thanks to James Lingard. (Vincent Bernat)
802 - [d2012fb3ba6c] Fix compilation without EDP (Vincent Bernat)
803 - [75b3469d012e] Handle reception and display of PVID (Vincent Bernat)
804 - [748e05dff920] This is maximum frame size, not MTU (Vincent Bernat)
805 - [548109b2074a] Add Maximum Frame Size support. For Linux, we just use MTU as MFS. (Vincent Bernat)
749806
750807 0.3 [2008-12-14 12:06:33 +0100]:
751808
752 - [de44f06] Fix manual page (missing .El) (Vincent Bernat)
753 - [9dbba5a] Prepare new 0.3 version (Vincent Bernat)
754 - [a09c32f] Add a note about the fact that location option could be moved to lldpctl. This will be done when we can keep persistent data. (Vincent Bernat)
755 - [7286246] Do not try to set media type network policy since its usefulness is near zero when not being able to set it differently on each port. Those kind of information should be set through SNMP. (Vincent Bernat)
756 - [115ff55] Allow to send LLDP-MED location. (Vincent Bernat)
757 - [c790233] Accept too large TLV for LLDP (Vincent Bernat)
758 - [ccea83b] Allow to specify interfaces to display on lldpctl command line (Vincent Bernat)
759 - [a806f67] Don't display management IP if there is none (Vincent Bernat)
760 - [9d09937] Add SLIST support for libc not shipping it (like Sarge) (Vincent Bernat)
761 - [1e379fe] Fix parsing of LLDP-MED location, including display of altitude and datum. (Vincent Bernat)
762 - [1be9e1b] Export PSE/PD LLDP-MED stuff to SNMP (Vincent Bernat)
763 - [4a2acc8] SNMP support for LLDP-MED location and network policy (Vincent Bernat)
764 - [c147106] Merge branch 'master' into lldpmed (Vincent Bernat)
765 - [89590c8] Padding and alignment is really the same thing. (Vincent Bernat)
766 - [34261a9] Fix alignment problems. (Vincent Bernat)
767 - [0d83eba] Fix compilation on 32bits arch by using long long int constants. (Vincent Bernat)
768 - [0c8f36f] Rewrite structure packing to handle substructures correctly. There are still some problems... (Vincent Bernat)
769 - [a9e9242] Do not display autoneg stuff when we have nothing (Vincent Bernat)
770 - [b5a6c47] Handle more gracefully DNS problems by keeping nodename (Vincent Bernat)
771 - [a26fc61] Use 0:0:0:0:0:0 MAC address when sending on inactive slaves (Vincent Bernat)
772 - [3cb138e] Simplify MAC address generation for enslaved inactive devices (Vincent Bernat)
773 - [1d29152] For enslaved devices, get the real MAC address from /proc/net/bonding (Vincent Bernat)
774 - [d9be8ea] Factorize out cleanup of lldpd_hardware structure (Vincent Bernat)
775 - [4395f9c] Do not share port id with interface MAC address (port id can be freed, while interface MAC address is staticaly allocated) (Vincent Bernat)
776 - [f7db0dd] When sending on inactive slaves, use a random MAC address (Vincent Bernat)
777 - [4982b86] Display available capabilities instead of enabled capabilities (they are listed below) (Vincent Bernat)
778 - [a49b3a7] Handle correctly MDI/PSE or PD capabilities (Vincent Bernat)
779 - [994812b] Parse LLDP-MED MDI when receiving frames (Vincent Bernat)
780 - [650cae5] Parse location for LLDP-MED. (Vincent Bernat)
781 - [e3a44ef] Accept to receive several location and several network policy for LLDP-MED (Vincent Bernat)
782 - [beeaefa] Don't send anything on inactive slaves (this confuses most switches) (Vincent Bernat)
783 - [4cff932] Dump less information for LLDP-MED location data (Vincent Bernat)
784 - [228fcec] Don't output too many new lines when displaying LLDP-MED information (Vincent Bernat)
785 - [b530152] Encode location data as data+len to enable use of 0 characters. (Vincent Bernat)
786 - [fd6f5ab] Merge branch 'master' into lldpmed (Vincent Bernat)
787 - [c0a3950] Do not close control socket when there is an ethtool ioctl problem: we want to use it for future ioctl... (Vincent Bernat)
788 - [40ecae8] Compute and handle correctly LLDP-MED capabilities (available and enabled) (Vincent Bernat)
789 - [efe3f9b] More LLDP-MED support, thanks to Michael Hanig. (Vincent Bernat)
790 - [a700e93] Some equipments send empty TLV for optional TLV (Vincent Bernat)
791 - [4365538] Complete changelog with recent changes (Vincent Bernat)
792 - [7985ba6] Add configuration switch to disable LLDP-MED inventory sending (Vincent Bernat)
793 - [e809a58] Add an option to not send LLDP-MED inventory TLV (Vincent Bernat)
794 - [1fea212] Remove unneeded iface_is_bridged function (Vincent Bernat)
795 - [c6df6eb] Handle bridge in a different way using BRCTL_GET_BRIDGES instead of trying to ioctl all devices (Vincent Bernat)
796 - [1531f7f] More natural definition of packing macros (Vincent Bernat)
797 - [d3322e2] Use lldpd_*_cleanup() functions instead of manual free (Vincent Bernat)
798 - [a1347cd] Add a way to disable Dot1 and Dot3 (Vincent Bernat)
799 - [72c4c96] Fix a typo when receiving LLDP-MED inventory asset id. (Vincent Bernat)
800 - [44cbe56] Fix reception of LLDP-MED inventory: one byte was stripped (Vincent Bernat)
801 - [b193e97] Update CHANGELOG and README to state that LLDP-MED is supported (Vincent Bernat)
802 - [1d88c84] Add support for LLDP-MED retrieval through SNMP (Vincent Bernat)
803 - [6772b23] Implement LLDP-MED reception and display (Vincent Bernat)
804 - [89840df] Start support of LLDP-MED: send support is implemented (Vincent Bernat)
805 - [315587e] Move at the bottom of configure.ac the instructions to conditionaly compile additional protocols (Vincent Bernat)
806 - [4bad193] Allow to compile only needed protocols (Vincent Bernat)
807 - [bff3c98] Fix a bug happening when walking local management address part of the MIB (Vincent Bernat)
808 - [52ac3f3] Add a word about the default (broken) NetSNMP installation. (Vincent Bernat)
809 - [5ac76eb] When unable to connect to SNMP socket, give a sensible error message (Vincent Bernat)
810 - [90149ee] When monitored process dies early, handle this case gracefully (Vincent Bernat)
811 - [9aee81a] Define ADVERTISED_(Asym_)?Pause if not defined in linux/ethtool.h (Vincent Bernat)
809 - [de44f0685e11] Fix manual page (missing .El) (Vincent Bernat)
810 - [9dbba5ae1996] Prepare new 0.3 version (Vincent Bernat)
811 - [a09c32f77be1] Add a note about the fact that location option could be moved to lldpctl. This will be done when we can keep persistent data. (Vincent Bernat)
812 - [7286246f5d43] Do not try to set media type network policy since its usefulness is near zero when not being able to set it differently on each port. Those kind of information should be set through SNMP. (Vincent Bernat)
813 - [115ff55c3b71] Allow to send LLDP-MED location. (Vincent Bernat)
814 - [c790233e521e] Accept too large TLV for LLDP (Vincent Bernat)
815 - [ccea83b2194a] Allow to specify interfaces to display on lldpctl command line (Vincent Bernat)
816 - [a806f67af4e7] Don't display management IP if there is none (Vincent Bernat)
817 - [9d09937f2fad] Add SLIST support for libc not shipping it (like Sarge) (Vincent Bernat)
818 - [1e379fe3d038] Fix parsing of LLDP-MED location, including display of altitude and datum. (Vincent Bernat)
819 - [1be9e1b58f87] Export PSE/PD LLDP-MED stuff to SNMP (Vincent Bernat)
820 - [4a2acc8ebb12] SNMP support for LLDP-MED location and network policy (Vincent Bernat)
821 - [c1471068c468] Merge branch 'master' into lldpmed (Vincent Bernat)
822 - [89590c8f0461] Padding and alignment is really the same thing. (Vincent Bernat)
823 - [34261a93eb8e] Fix alignment problems. (Vincent Bernat)
824 - [0d83ebaec154] Fix compilation on 32bits arch by using long long int constants. (Vincent Bernat)
825 - [0c8f36f317b2] Rewrite structure packing to handle substructures correctly. There are still some problems... (Vincent Bernat)
826 - [a9e9242e473e] Do not display autoneg stuff when we have nothing (Vincent Bernat)
827 - [b5a6c4796eb3] Handle more gracefully DNS problems by keeping nodename (Vincent Bernat)
828 - [a26fc61cbad1] Use 0:0:0:0:0:0 MAC address when sending on inactive slaves (Vincent Bernat)
829 - [3cb138e01b8e] Simplify MAC address generation for enslaved inactive devices (Vincent Bernat)
830 - [1d291522e96d] For enslaved devices, get the real MAC address from /proc/net/bonding (Vincent Bernat)
831 - [d9be8ea0aa1a] Factorize out cleanup of lldpd_hardware structure (Vincent Bernat)
832 - [4395f9c11b13] Do not share port id with interface MAC address (port id can be freed, while interface MAC address is staticaly allocated) (Vincent Bernat)
833 - [f7db0dd82b3d] When sending on inactive slaves, use a random MAC address (Vincent Bernat)
834 - [4982b8649d33] Display available capabilities instead of enabled capabilities (they are listed below) (Vincent Bernat)
835 - [a49b3a79b616] Handle correctly MDI/PSE or PD capabilities (Vincent Bernat)
836 - [994812b9b52e] Parse LLDP-MED MDI when receiving frames (Vincent Bernat)
837 - [650cae58d9d1] Parse location for LLDP-MED. (Vincent Bernat)
838 - [e3a44efb9d3c] Accept to receive several location and several network policy for LLDP-MED (Vincent Bernat)
839 - [beeaefa353f0] Don't send anything on inactive slaves (this confuses most switches) (Vincent Bernat)
840 - [4cff932d168b] Dump less information for LLDP-MED location data (Vincent Bernat)
841 - [228fcecd43c9] Don't output too many new lines when displaying LLDP-MED information (Vincent Bernat)
842 - [b530152e5269] Encode location data as data+len to enable use of 0 characters. (Vincent Bernat)
843 - [fd6f5ab77560] Merge branch 'master' into lldpmed (Vincent Bernat)
844 - [c0a395035d6c] Do not close control socket when there is an ethtool ioctl problem: we want to use it for future ioctl... (Vincent Bernat)
845 - [40ecae87747e] Compute and handle correctly LLDP-MED capabilities (available and enabled) (Vincent Bernat)
846 - [efe3f9b0fcb0] More LLDP-MED support, thanks to Michael Hanig. (Vincent Bernat)
847 - [a700e935a122] Some equipments send empty TLV for optional TLV (Vincent Bernat)
848 - [43655386247f] Complete changelog with recent changes (Vincent Bernat)
849 - [7985ba6247d2] Add configuration switch to disable LLDP-MED inventory sending (Vincent Bernat)
850 - [e809a587bb1a] Add an option to not send LLDP-MED inventory TLV (Vincent Bernat)
851 - [1fea2128f426] Remove unneeded iface_is_bridged function (Vincent Bernat)
852 - [c6df6eb9e060] Handle bridge in a different way using BRCTL_GET_BRIDGES instead of trying to ioctl all devices (Vincent Bernat)
853 - [1531f7f30b16] More natural definition of packing macros (Vincent Bernat)
854 - [d3322e2362d3] Use lldpd_*_cleanup() functions instead of manual free (Vincent Bernat)
855 - [a1347cd86b43] Add a way to disable Dot1 and Dot3 (Vincent Bernat)
856 - [72c4c96fdcba] Fix a typo when receiving LLDP-MED inventory asset id. (Vincent Bernat)
857 - [44cbe5680871] Fix reception of LLDP-MED inventory: one byte was stripped (Vincent Bernat)
858 - [b193e97e22c8] Update CHANGELOG and README to state that LLDP-MED is supported (Vincent Bernat)
859 - [1d88c8434cc8] Add support for LLDP-MED retrieval through SNMP (Vincent Bernat)
860 - [6772b2377970] Implement LLDP-MED reception and display (Vincent Bernat)
861 - [89840df069d4] Start support of LLDP-MED: send support is implemented (Vincent Bernat)
862 - [315587efa487] Move at the bottom of configure.ac the instructions to conditionaly compile additional protocols (Vincent Bernat)
863 - [4bad19376291] Allow to compile only needed protocols (Vincent Bernat)
864 - [bff3c98df955] Fix a bug happening when walking local management address part of the MIB (Vincent Bernat)
865 - [52ac3f370b38] Add a word about the default (broken) NetSNMP installation. (Vincent Bernat)
866 - [5ac76ebafe44] When unable to connect to SNMP socket, give a sensible error message (Vincent Bernat)
867 - [90149ee346a2] When monitored process dies early, handle this case gracefully (Vincent Bernat)
868 - [9aee81ae0466] Define ADVERTISED_(Asym_)?Pause if not defined in linux/ethtool.h (Vincent Bernat)
812869
813870 0.2.1 [2008-11-19 20:08:11 +0100]:
814871
815 - [ff1910c] Prepare a new release (Vincent Bernat)
816 - [0aa5f67] Fix open() calls (Vincent Bernat)
817 - [461bd49] Fix .Bl parameter in manual pages (Vincent Bernat)
818
872 - [ff1910c812a7] Prepare a new release (Vincent Bernat)
873 - [0aa5f6766136] Fix open() calls (Vincent Bernat)
874 - [461bd4909be4] Fix .Bl parameter in manual pages (Vincent Bernat)
875
3030 echo $(VERSION) > $(distdir)/.dist-version
3131
3232 MOSTLYCLEANFILES = $(DX_CLEANFILES)
33
34 # systemd and launchd files are not installed in the prefix, don't
35 # request them for distcheck
36 DISTCHECK_CONFIGURE_FLAGS = \
37 --with-systemdsystemunitdir=no \
38 --with-launchddaemonsdir=no
0 # Makefile.in generated by automake 1.13.3 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
33 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
125125 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
126126 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
127127 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/os.m4 \
128 $(top_srcdir)/m4/progname.m4 $(top_srcdir)/m4/snmp.m4 \
129 $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/xml2.m4 \
128 $(top_srcdir)/m4/progname.m4 $(top_srcdir)/m4/seccomp.m4 \
129 $(top_srcdir)/m4/snmp.m4 $(top_srcdir)/m4/stdint.m4 \
130 $(top_srcdir)/m4/systemtap.m4 $(top_srcdir)/m4/xml2.m4 \
130131 $(top_srcdir)/configure.ac
131132 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
132133 $(ACLOCAL_M4)
289290 DLLTOOL = @DLLTOOL@
290291 DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
291292 DSYMUTIL = @DSYMUTIL@
293 DTRACE = @DTRACE@
292294 DUMPBIN = @DUMPBIN@
293295 DX_CONFIG = @DX_CONFIG@
294296 DX_DOCDIR = @DX_DOCDIR@
327329 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
328330 JANSSON_CFLAGS = @JANSSON_CFLAGS@
329331 JANSSON_LIBS = @JANSSON_LIBS@
332 LAUNCHDDAEMONSDIR = @LAUNCHDDAEMONSDIR@
330333 LD = @LD@
331334 LDFLAGS = @LDFLAGS@
332335 LIBEVENT_CFLAGS = @LIBEVENT_CFLAGS@
367370 PRIVSEP_USER = @PRIVSEP_USER@
368371 RANLIB = @RANLIB@
369372 READLINE_LIBS = @READLINE_LIBS@
373 SECCOMP_CFLAGS = @SECCOMP_CFLAGS@
374 SECCOMP_LIBS = @SECCOMP_LIBS@
370375 SED = @SED@
371376 SET_MAKE = @SET_MAKE@
372377 SHELL = @SHELL@
373378 STRIP = @STRIP@
379 SYSTEMDSYSTEMUNITDIR = @SYSTEMDSYSTEMUNITDIR@
374380 VERSION = @VERSION@
375381 XML2_CFLAGS = @XML2_CFLAGS@
376382 XML2_CONFIG = @XML2_CONFIG@
409415 includedir = @includedir@
410416 infodir = @infodir@
411417 install_sh = @install_sh@
418 launchddaemonsdir = @launchddaemonsdir@
412419 libdir = @libdir@
413420 libexecdir = @libexecdir@
414421 localedir = @localedir@
425432 srcdir = @srcdir@
426433 subdirs = @subdirs@
427434 sysconfdir = @sysconfdir@
435 systemdsystemunitdir = @systemdsystemunitdir@
428436 target_alias = @target_alias@
429437 top_build_prefix = @top_build_prefix@
430438 top_builddir = @top_builddir@
461469 dist_doc_DATA = README.md NEWS CONTRIBUTE.md
462470 doc_DATA = ChangeLog
463471 MOSTLYCLEANFILES = $(DX_CLEANFILES)
472
473 # systemd and launchd files are not installed in the prefix, don't
474 # request them for distcheck
475 DISTCHECK_CONFIGURE_FLAGS = \
476 --with-systemdsystemunitdir=no \
477 --with-launchddaemonsdir=no
478
464479 all: config.h
465480 $(MAKE) $(AM_MAKEFLAGS) all-recursive
466481
502517 $(am__aclocal_m4_deps):
503518
504519 config.h: stamp-h1
505 @if test ! -f $@; then rm -f stamp-h1; else :; fi
506 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
520 @test -f $@ || rm -f stamp-h1
521 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
507522
508523 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
509524 @rm -f stamp-h1
761776 $(am__post_remove_distdir)
762777
763778 dist-tarZ: distdir
779 @echo WARNING: "Support for shar distribution archives is" \
780 "deprecated." >&2
781 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
764782 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
765783 $(am__post_remove_distdir)
766784
767785 dist-shar: distdir
786 @echo WARNING: "Support for distribution archives compressed with" \
787 "legacy program 'compress' is deprecated." >&2
788 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
768789 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
769790 $(am__post_remove_distdir)
770791
0 lldpd (0.7.7)
1 * Features:
2 + Use a locally administered MAC address or an arbitrary one
3 instead of null MAC address for bond devices on Linux. This is
4 configurable through `lldpcli`.
5 + Add support for "team" driver (alternative to bond devices).
6 + Preliminary support for DTrace/systemtap.
7 + Preliminary support for seccomp (for monitor process).
8 + Setup chroot inside lldpd instead of relying on init script.
9 * Fixes:
10 + Various bugs related to fixed point number handling (for
11 coordinates in LLDP-MED)
12 + Fix a regression in how MAC address of an enslaved device is
13 retrieved.
14
015 lldpd (0.7.6)
116 * Features:
217 + Provide a way to build packages for OSX.
8484 directory):
8585
8686 mkdir build && cd build
87 ../configure --prefix=/usr --sysconfdir=/etc --with-embedded-libevent
87 ../configure --prefix=/usr --sysconfdir=/private/etc --with-embedded-libevent
8888 make -C osx pkg ARCHS="i386 x86_64"
8989
9090 If you want to compile for an older version of Mac OS X, you need
9292
9393 SDK=/Developer/SDKs/MacOSX10.6.sdk
9494 mkdir build && cd build
95 ../configure --prefix=/usr --sysconfdir=/etc --with-embedded-libevent \
95 ../configure --prefix=/usr --sysconfdir=/private/etc --with-embedded-libevent \
9696 CFLAGS="-mmacosx-version-min=10.6 -isysroot $SDK" \
9797 LDFLAGS="-mmacosx-version-min=10.6 -isysroot $SDK"
9898 make -C osx pkg ARCHS="i386 x86_64"
140140 Some devices (notably Cisco IOS) send frames on the native VLAN while
141141 they should send them untagged. If your network card does not support
142142 accelerated VLAN, you will receive those frames as well. However, if
143 your network card handles VLAN encapsulation/decapsulation, you need a
144 recent kernel to be able to receive those frames without listening on
145 all available VLAN. Starting from Linux 2.6.27, lldpd is able to
146 capture VLAN frames when VLAN acceleration is supported by the network
147 card. Here is the patch:
143 your network card handles VLAN encapsulation/decapsulation (check with
144 `ethtool -k`), you need a recent kernel to be able to receive those
145 frames without listening on all available VLAN. Starting from Linux
146 2.6.27, lldpd is able to capture VLAN frames when VLAN acceleration is
147 supported by the network card. Here is the patch:
148148 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bc1d0411b804ad190cdadabac48a10067f17b9e6
149
150 On some versions, frames are sent on VLAN 1. If your network card
151 support accelerated VLAN, you need to subscribe to this VLAN as
152 well. The Linux kernel does not provide any interface for this. The
153 easiest way is to create the VLAN for each port:
154
155 ip link add link eth0 name eth0.1 type vlan id 1
156 ip link set up dev eth0.1
157
158 You can check both cases using tcpdump:
159
160 tcpdump -epni eth0 ether host 01:80:c2:00:00:0e
161 tcpdump -eni eth0 ether host 01:80:c2:00:00:0e
162
163 If the first command does not display received LLDP packets but the
164 second one does, LLDP packets are likely encapsulated into a VLAN:
165
166 10:54:06.431154 f0:29:29:1d:7c:01 > 01:80:c2:00:00:0e, ethertype 802.1Q (0x8100), length 363: vlan 1, p 7, ethertype LLDP, LLDP, name SW-APP-D07.VTY, length 345
167
168 In this case, just create VLAN 1 will fix the situation.
149169
150170 More information:
151171 * http://en.wikipedia.org/wiki/Link_Layer_Discovery_Protocol
0 # generated automatically by aclocal 1.13.3 -*- Autoconf -*-
0 # generated automatically by aclocal 1.14 -*- Autoconf -*-
11
22 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
33
191191 # generated from the m4 files accompanying Automake X.Y.
192192 # (This private macro should not be called outside this file.)
193193 AC_DEFUN([AM_AUTOMAKE_VERSION],
194 [am__api_version='1.13'
194 [am__api_version='1.14'
195195 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
196196 dnl require some minimum version. Point them to the right macro.
197 m4_if([$1], [1.13.3], [],
197 m4_if([$1], [1.14], [],
198198 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
199199 ])
200200
210210 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
211211 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
212212 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
213 [AM_AUTOMAKE_VERSION([1.13.3])dnl
213 [AM_AUTOMAKE_VERSION([1.14])dnl
214214 m4_ifndef([AC_AUTOCONF_VERSION],
215215 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
216216 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
235235 : ${AR=ar}
236236
237237 AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
238 [am_cv_ar_interface=ar
238 [AC_LANG_PUSH([C])
239 am_cv_ar_interface=ar
239240 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
240241 [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
241242 AC_TRY_EVAL([am_ar_try])
252253 fi
253254 rm -f conftest.lib libconftest.a
254255 ])
255 ])
256 AC_LANG_POP([C])])
256257
257258 case $am_cv_ar_interface in
258259 ar)
636637 # This macro actually does too much. Some checks are only needed if
637638 # your package does certain things. But this isn't really a big deal.
638639
640 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
641 m4_define([AC_PROG_CC],
642 m4_defn([AC_PROG_CC])
643 [_AM_PROG_CC_C_O
644 ])
645
639646 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
640647 # AM_INIT_AUTOMAKE([OPTIONS])
641648 # -----------------------------------------------
744751 AC_CONFIG_COMMANDS_PRE(dnl
745752 [m4_provide_if([_AM_COMPILER_EXEEXT],
746753 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
747 ])
754
755 # POSIX will say in a future version that running "rm -f" with no argument
756 # is OK; and we want to be able to make that assumption in our Makefile
757 # recipes. So use an aggressive probe to check that the usage we want is
758 # actually supported "in the wild" to an acceptable degree.
759 # See automake bug#10828.
760 # To make any issue more visible, cause the running configure to be aborted
761 # by default if the 'rm' program in use doesn't match our expectations; the
762 # user can still override this though.
763 if rm -f && rm -fr && rm -rf; then : OK; else
764 cat >&2 <<'END'
765 Oops!
766
767 Your 'rm' program seems unable to run without file operands specified
768 on the command line, even when the '-f' option is present. This is contrary
769 to the behaviour of most rm programs out there, and not conforming with
770 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
771
772 Please tell bug-automake@gnu.org about your system, including the value
773 of your $PATH and any error possibly output before this message. This
774 can help us improve future automake versions.
775
776 END
777 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
778 echo 'Configuration will proceed anyway, since you have set the' >&2
779 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
780 echo >&2
781 else
782 cat >&2 <<'END'
783 Aborting the configuration process, to ensure you take notice of the issue.
784
785 You can download and install GNU coreutils to get an 'rm' implementation
786 that behaves properly: <http://www.gnu.org/software/coreutils/>.
787
788 If you want to complete the configuration process using your problematic
789 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
790 to "yes", and re-run configure.
791
792 END
793 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
794 fi
795 fi])
748796
749797 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
750798 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
751799 dnl mangled by Autoconf and run in a shell conditional statement.
752800 m4_define([_AC_COMPILER_EXEEXT],
753801 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
754
755802
756803 # When config.status generates a header, we must update the stamp-h file.
757804 # This file resides in the same directory as the config header
900947 rm -f confinc confmf
901948 ])
902949
903 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
904 #
905 # This file is free software; the Free Software Foundation
906 # gives unlimited permission to copy and/or distribute it,
907 # with or without modifications, as long as this notice is preserved.
908
909 # AM_PROG_CC_C_O
910 # --------------
911 # Like AC_PROG_CC_C_O, but changed for automake.
912 AC_DEFUN([AM_PROG_CC_C_O],
913 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
914 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
915 AC_REQUIRE_AUX_FILE([compile])dnl
916 # FIXME: we rely on the cache variable name because
917 # there is no other way.
918 set dummy $CC
919 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
920 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
921 if test "$am_t" != yes; then
922 # Losing compiler, so override with the script.
923 # FIXME: It is wrong to rewrite CC.
924 # But if we don't then we get into trouble of one sort or another.
925 # A longer-term fix would be to have automake use am__CC in this case,
926 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
927 CC="$am_aux_dir/compile $CC"
928 fi
929 dnl Make sure AC_PROG_CC is never called again, or it will override our
930 dnl setting of CC.
931 m4_define([AC_PROG_CC],
932 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
933 ])
934
935950 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
936951
937952 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
10011016 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10021017 AC_DEFUN([_AM_IF_OPTION],
10031018 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1019
1020 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
1021 #
1022 # This file is free software; the Free Software Foundation
1023 # gives unlimited permission to copy and/or distribute it,
1024 # with or without modifications, as long as this notice is preserved.
1025
1026 # _AM_PROG_CC_C_O
1027 # ---------------
1028 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
1029 # to automatically call this.
1030 AC_DEFUN([_AM_PROG_CC_C_O],
1031 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1032 AC_REQUIRE_AUX_FILE([compile])dnl
1033 AC_LANG_PUSH([C])dnl
1034 AC_CACHE_CHECK(
1035 [whether $CC understands -c and -o together],
1036 [am_cv_prog_cc_c_o],
1037 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
1038 # Make sure it works both with $CC and with simple cc.
1039 # Following AC_PROG_CC_C_O, we do the test twice because some
1040 # compilers refuse to overwrite an existing .o file with -o,
1041 # though they will create one.
1042 am_cv_prog_cc_c_o=yes
1043 for am_i in 1 2; do
1044 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
1045 && test -f conftest2.$ac_objext; then
1046 : OK
1047 else
1048 am_cv_prog_cc_c_o=no
1049 break
1050 fi
1051 done
1052 rm -f core conftest*
1053 unset am_i])
1054 if test "$am_cv_prog_cc_c_o" != yes; then
1055 # Losing compiler, so override with the script.
1056 # FIXME: It is wrong to rewrite CC.
1057 # But if we don't then we get into trouble of one sort or another.
1058 # A longer-term fix would be to have automake use am__CC in this case,
1059 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1060 CC="$am_aux_dir/compile $CC"
1061 fi
1062 AC_LANG_POP([C])])
1063
1064 # For backward compatibility.
1065 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
1066
1067 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1068 #
1069 # This file is free software; the Free Software Foundation
1070 # gives unlimited permission to copy and/or distribute it,
1071 # with or without modifications, as long as this notice is preserved.
1072
1073 # AM_RUN_LOG(COMMAND)
1074 # -------------------
1075 # Run COMMAND, save the exit status in ac_status, and log it.
1076 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1077 AC_DEFUN([AM_RUN_LOG],
1078 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1079 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1080 ac_status=$?
1081 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1082 (exit $ac_status); }])
10041083
10051084 # Check to make sure that the build environment is sane. -*- Autoconf -*-
10061085
13371416 m4_include([m4/lt~obsolete.m4])
13381417 m4_include([m4/os.m4])
13391418 m4_include([m4/progname.m4])
1419 m4_include([m4/seccomp.m4])
13401420 m4_include([m4/snmp.m4])
13411421 m4_include([m4/stdint.m4])
1422 m4_include([m4/systemtap.m4])
13421423 m4_include([m4/xml2.m4])
11 # Attempt to guess a canonical system name.
22 # Copyright 1992-2013 Free Software Foundation, Inc.
33
4 timestamp='2013-05-16'
4 timestamp='2013-06-10'
55
66 # This file is free software; you can redistribute it and/or modify it
77 # under the terms of the GNU General Public License as published by
994994 ppc:Linux:*:*)
995995 echo powerpc-unknown-linux-${LIBC}
996996 exit ;;
997 ppc64le:Linux:*:*)
998 echo powerpc64le-unknown-linux-${LIBC}
999 exit ;;
1000 ppcle:Linux:*:*)
1001 echo powerpcle-unknown-linux-${LIBC}
1002 exit ;;
9971003 s390:Linux:*:* | s390x:Linux:*:*)
9981004 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
9991005 exit ;;
77
88 /* Dot3 extension (PHY stuff) */
99 #undef ENABLE_DOT3
10
11 /* systemtap/DTrace trace support */
12 #undef ENABLE_DTRACE
1013
1114 /* Extreme Discovery Protocol */
1215 #undef ENABLE_EDP
9295 /* Define to 1 if you have the `setproctitle' function. */
9396 #undef HAVE_SETPROCTITLE
9497
98 /* Define to 1 if you have the `setproctitle_init' function. */
99 #undef HAVE_SETPROCTITLE_INIT
100
95101 /* Define to 1 if you have the `setresgid' function. */
96102 #undef HAVE_SETRESGID
97103
160166
161167 /* Host operating system is Solaris */
162168 #undef HOST_OS_SOLARIS
169
170 /* Directory for launchd configuration file (OSX) */
171 #undef LAUNCHDDAEMONSDIR
163172
164173 /* Define to the sub-directory in which libtool stores uninstalled libraries.
165174 */
166175 #undef LT_OBJDIR
167176
168 /* Define to 1 if your C compiler doesn't accept -c and -o together. */
169 #undef NO_MINUS_C_MINUS_O
170
171177 /* Name of package */
172178 #undef PACKAGE
173179
201207 /* Define to 1 if you have the ANSI C header files. */
202208 #undef STDC_HEADERS
203209
210 /* Directory for systemd service files */
211 #undef SYSTEMDSYSTEMUNITDIR
212
204213 /* Define to indicate to enable JSON support */
205214 #undef USE_JSON
206215
216 /* Define to indicate to enable seccomp support */
217 #undef USE_SECCOMP
218
207219 /* Define to indicate to enable SNMP support */
208220 #undef USE_SNMP
209221
11 # Configuration validation subroutine script.
22 # Copyright 1992-2013 Free Software Foundation, Inc.
33
4 timestamp='2013-04-24'
4 timestamp='2013-08-10'
55
66 # This file is free software; you can redistribute it and/or modify it
77 # under the terms of the GNU General Public License as published by
256256 | avr | avr32 \
257257 | be32 | be64 \
258258 | bfin \
259 | c4x | clipper \
259 | c4x | c8051 | clipper \
260260 | d10v | d30v | dlx | dsp16xx \
261261 | epiphany \
262262 | fido | fr30 | frv \
371371 | be32-* | be64-* \
372372 | bfin-* | bs2000-* \
373373 | c[123]* | c30-* | [cjt]90-* | c4x-* \
374 | clipper-* | craynv-* | cydra-* \
374 | c8051-* | clipper-* | craynv-* | cydra-* \
375375 | d10v-* | d30v-* | dlx-* \
376376 | elxsi-* \
377377 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
793793 os=-mingw64
794794 ;;
795795 mingw32)
796 basic_machine=i386-pc
796 basic_machine=i686-pc
797797 os=-mingw32
798798 ;;
799799 mingw32ce)
829829 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
830830 ;;
831831 msys)
832 basic_machine=i386-pc
832 basic_machine=i686-pc
833833 os=-msys
834834 ;;
835835 mvs)
15451545 c4x-* | tic4x-*)
15461546 os=-coff
15471547 ;;
1548 c8051-*)
1549 os=-elf
1550 ;;
15481551 hexagon-*)
15491552 os=-elf
15501553 ;;
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for lldpd 0.7.6.
2 # Generated by GNU Autoconf 2.69 for lldpd 0.7.7.
33 #
44 # Report bugs to <bernat@luffy.cx>.
55 #
589589 # Identity of this package.
590590 PACKAGE_NAME='lldpd'
591591 PACKAGE_TARNAME='lldpd'
592 PACKAGE_VERSION='0.7.6'
593 PACKAGE_STRING='lldpd 0.7.6'
592 PACKAGE_VERSION='0.7.7'
593 PACKAGE_STRING='lldpd 0.7.7'
594594 PACKAGE_BUGREPORT='bernat@luffy.cx'
595595 PACKAGE_URL=''
596596
636636 ac_subst_vars='am__EXEEXT_FALSE
637637 am__EXEEXT_TRUE
638638 LTLIBOBJS
639 USE_SECCOMP_FALSE
640 USE_SECCOMP_TRUE
639641 USE_JSON_FALSE
640642 USE_JSON_TRUE
641643 USE_XML_FALSE
647649 PRIVSEP_CHROOT
648650 PRIVSEP_GROUP
649651 PRIVSEP_USER
652 DTRACE
653 ENABLE_SYSTEMTAP_FALSE
654 ENABLE_SYSTEMTAP_TRUE
655 HAVE_SYSTEMDSYSTEMUNITDIR_FALSE
656 HAVE_SYSTEMDSYSTEMUNITDIR_TRUE
657 systemdsystemunitdir
658 SYSTEMDSYSTEMUNITDIR
659 HAVE_LAUNCHDDAEMONSDIR_FALSE
660 HAVE_LAUNCHDDAEMONSDIR_TRUE
661 launchddaemonsdir
662 LAUNCHDDAEMONSDIR
663 SECCOMP_LIBS
664 SECCOMP_CFLAGS
650665 JANSSON_LIBS
651666 JANSSON_CFLAGS
652667 XML2_CONFIG
879894 with_snmp
880895 with_xml
881896 with_json
897 with_seccomp
898 with_launchddaemonsdir
899 with_systemdsystemunitdir
900 enable_dtrace
882901 with_privsep_user
883902 with_privsep_group
884903 with_privsep_chroot
915934 XML2_CFLAGS
916935 XML2_LIBS
917936 JANSSON_CFLAGS
918 JANSSON_LIBS'
937 JANSSON_LIBS
938 SECCOMP_CFLAGS
939 SECCOMP_LIBS'
919940 ac_subdirs_all='libevent'
920941
921942 # Initialize some variables set by options.
14561477 # Omit some internal or obsolete options to make the list less imposing.
14571478 # This message is too long to be a string in the A/UX 3.1 sh.
14581479 cat <<_ACEOF
1459 \`configure' configures lldpd 0.7.6 to adapt to many kinds of systems.
1480 \`configure' configures lldpd 0.7.7 to adapt to many kinds of systems.
14601481
14611482 Usage: $0 [OPTION]... [VAR=VALUE]...
14621483
15261547
15271548 if test -n "$ac_init_help"; then
15281549 case $ac_init_help in
1529 short | recursive ) echo "Configuration of lldpd 0.7.6:";;
1550 short | recursive ) echo "Configuration of lldpd 0.7.7:";;
15301551 esac
15311552 cat <<\_ACEOF
15321553
15591580 --disable-doxygen-html don't generate doxygen plain HTML documentation
15601581 --enable-doxygen-ps generate doxygen PostScript documentation
15611582 --disable-doxygen-pdf don't generate doxygen PDF documentation
1583 --enable-dtrace Enable systemtap/DTrace trace support [default=no]
15621584 --enable-cdp Enable Cisco Discovery Protocol [default=yes]
15631585 --enable-fdp Enable Foundry Discovery Protocol [default=yes]
15641586 --enable-edp Enable Extreme Discovery Protocol [default=yes]
15851607 --with-snmp Enable the use of SNMP [default=no]
15861608 --with-xml Enable XML output via libxml2 [default=no]
15871609 --with-json Enable JSON output via Jansson [default=no]
1610 --with-seccomp Enable seccomp support (with libseccomp)
1611 [default=no]
1612 --with-launchddaemonsdir
1613 Directory for launchd configuration file (OSX)
1614 [default=/Library/LaunchDaemons]
1615 --with-systemdsystemunitdir
1616 Directory for systemd service files
1617 [default=$($PKG_CONFIG
1618 --variable=systemdsystemunitdir systemd)]
15881619 --with-privsep-user Which user to use for privilege separation
15891620 [default=_lldpd]
15901621 --with-privsep-group Which group to use for privilege separation
16241655 C compiler flags for JANSSON, overriding pkg-config
16251656 JANSSON_LIBS
16261657 linker flags for JANSSON, overriding pkg-config
1658 SECCOMP_CFLAGS
1659 C compiler flags for SECCOMP, overriding pkg-config
1660 SECCOMP_LIBS
1661 linker flags for SECCOMP, overriding pkg-config
16271662
16281663 Use these variables to override the choices made by `configure' or to help
16291664 it to find libraries and programs with nonstandard names/locations.
16911726 test -n "$ac_init_help" && exit $ac_status
16921727 if $ac_init_version; then
16931728 cat <<\_ACEOF
1694 lldpd configure 0.7.6
1729 lldpd configure 0.7.7
16951730 generated by GNU Autoconf 2.69
16961731
16971732 Copyright (C) 2012 Free Software Foundation, Inc.
22922327 This file contains any messages produced by compilers while
22932328 running configure, to aid debugging if configure makes a mistake.
22942329
2295 It was created by lldpd $as_me 0.7.6, which was
2330 It was created by lldpd $as_me 0.7.7, which was
22962331 generated by GNU Autoconf 2.69. Invocation command line was
22972332
22982333 $ $0 $@
26522687
26532688 ac_config_files="$ac_config_files osx/scripts/postinstall"
26542689
2690 ac_config_files="$ac_config_files src/daemon/lldpd.service"
2691
26552692
26562693 CONFIGURE_ARGS=$ac_configure_args
26572694
26582695
26592696 # Configure automake
2660 am__api_version='1.13'
2697 am__api_version='1.14'
26612698
26622699 ac_aux_dir=
26632700 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
31723209
31733210 # Define the identity of the package.
31743211 PACKAGE='lldpd'
3175 VERSION='0.7.6'
3212 VERSION='0.7.7'
31763213
31773214
31783215 cat >>confdefs.h <<_ACEOF
32233260
32243261
32253262
3263 # POSIX will say in a future version that running "rm -f" with no argument
3264 # is OK; and we want to be able to make that assumption in our Makefile
3265 # recipes. So use an aggressive probe to check that the usage we want is
3266 # actually supported "in the wild" to an acceptable degree.
3267 # See automake bug#10828.
3268 # To make any issue more visible, cause the running configure to be aborted
3269 # by default if the 'rm' program in use doesn't match our expectations; the
3270 # user can still override this though.
3271 if rm -f && rm -fr && rm -rf; then : OK; else
3272 cat >&2 <<'END'
3273 Oops!
3274
3275 Your 'rm' program seems unable to run without file operands specified
3276 on the command line, even when the '-f' option is present. This is contrary
3277 to the behaviour of most rm programs out there, and not conforming with
3278 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3279
3280 Please tell bug-automake@gnu.org about your system, including the value
3281 of your $PATH and any error possibly output before this message. This
3282 can help us improve future automake versions.
3283
3284 END
3285 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3286 echo 'Configuration will proceed anyway, since you have set the' >&2
3287 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3288 echo >&2
3289 else
3290 cat >&2 <<'END'
3291 Aborting the configuration process, to ensure you take notice of the issue.
3292
3293 You can download and install GNU coreutils to get an 'rm' implementation
3294 that behaves properly: <http://www.gnu.org/software/coreutils/>.
3295
3296 If you want to complete the configuration process using your problematic
3297 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3298 to "yes", and re-run configure.
3299
3300 END
3301 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3302 fi
3303 fi
32263304
32273305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
32283306 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
41394217 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41404218 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41414219 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4220
4221 ac_ext=c
4222 ac_cpp='$CPP $CPPFLAGS'
4223 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4224 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4225 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4227 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4228 if ${am_cv_prog_cc_c_o+:} false; then :
4229 $as_echo_n "(cached) " >&6
4230 else
4231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4232 /* end confdefs.h. */
4233
4234 int
4235 main ()
4236 {
4237
4238 ;
4239 return 0;
4240 }
4241 _ACEOF
4242 # Make sure it works both with $CC and with simple cc.
4243 # Following AC_PROG_CC_C_O, we do the test twice because some
4244 # compilers refuse to overwrite an existing .o file with -o,
4245 # though they will create one.
4246 am_cv_prog_cc_c_o=yes
4247 for am_i in 1 2; do
4248 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4249 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4250 ac_status=$?
4251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4252 (exit $ac_status); } \
4253 && test -f conftest2.$ac_objext; then
4254 : OK
4255 else
4256 am_cv_prog_cc_c_o=no
4257 break
4258 fi
4259 done
4260 rm -f core conftest*
4261 unset am_i
4262 fi
4263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4264 $as_echo "$am_cv_prog_cc_c_o" >&6; }
4265 if test "$am_cv_prog_cc_c_o" != yes; then
4266 # Losing compiler, so override with the script.
4267 # FIXME: It is wrong to rewrite CC.
4268 # But if we don't then we get into trouble of one sort or another.
4269 # A longer-term fix would be to have automake use am__CC in this case,
4270 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4271 CC="$am_aux_dir/compile $CC"
4272 fi
4273 ac_ext=c
4274 ac_cpp='$CPP $CPPFLAGS'
4275 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4276 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4277 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4278
41424279
41434280 depcc="$CC" am_compiler_list=
41444281
43764513 if ${am_cv_ar_interface+:} false; then :
43774514 $as_echo_n "(cached) " >&6
43784515 else
4379 am_cv_ar_interface=ar
4516 ac_ext=c
4517 ac_cpp='$CPP $CPPFLAGS'
4518 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4519 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4520 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4521
4522 am_cv_ar_interface=ar
43804523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43814524 /* end confdefs.h. */
43824525 int some_variable = 0;
44074550
44084551 fi
44094552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4553 ac_ext=c
4554 ac_cpp='$CPP $CPPFLAGS'
4555 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4556 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4557 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44104558
44114559 fi
44124560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
1256412712 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1256512713 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1256612714 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12715
12716 ac_ext=c
12717 ac_cpp='$CPP $CPPFLAGS'
12718 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12719 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12720 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
12722 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
12723 if ${am_cv_prog_cc_c_o+:} false; then :
12724 $as_echo_n "(cached) " >&6
12725 else
12726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12727 /* end confdefs.h. */
12728
12729 int
12730 main ()
12731 {
12732
12733 ;
12734 return 0;
12735 }
12736 _ACEOF
12737 # Make sure it works both with $CC and with simple cc.
12738 # Following AC_PROG_CC_C_O, we do the test twice because some
12739 # compilers refuse to overwrite an existing .o file with -o,
12740 # though they will create one.
12741 am_cv_prog_cc_c_o=yes
12742 for am_i in 1 2; do
12743 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
12744 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
12745 ac_status=$?
12746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12747 (exit $ac_status); } \
12748 && test -f conftest2.$ac_objext; then
12749 : OK
12750 else
12751 am_cv_prog_cc_c_o=no
12752 break
12753 fi
12754 done
12755 rm -f core conftest*
12756 unset am_i
12757 fi
12758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
12759 $as_echo "$am_cv_prog_cc_c_o" >&6; }
12760 if test "$am_cv_prog_cc_c_o" != yes; then
12761 # Losing compiler, so override with the script.
12762 # FIXME: It is wrong to rewrite CC.
12763 # But if we don't then we get into trouble of one sort or another.
12764 # A longer-term fix would be to have automake use am__CC in this case,
12765 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
12766 CC="$am_aux_dir/compile $CC"
12767 fi
12768 ac_ext=c
12769 ac_cpp='$CPP $CPPFLAGS'
12770 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12771 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12772 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12773
1256712774
1256812775 depcc="$CC" am_compiler_list=
1256912776
1645516662 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1645616663
1645716664
16458 if test "x$CC" != xcc; then
16459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
16460 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
16461 else
16462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
16463 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
16464 fi
16465 set dummy $CC; ac_cc=`$as_echo "$2" |
16466 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
16467 if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
16468 $as_echo_n "(cached) " >&6
16469 else
16470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16471 /* end confdefs.h. */
16472
16473 int
16474 main ()
16475 {
16476
16477 ;
16478 return 0;
16479 }
16480 _ACEOF
16481 # Make sure it works both with $CC and with simple cc.
16482 # We do the test twice because some compilers refuse to overwrite an
16483 # existing .o file with -o, though they will create one.
16484 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
16485 rm -f conftest2.*
16486 if { { case "(($ac_try" in
16487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16488 *) ac_try_echo=$ac_try;;
16489 esac
16490 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
16491 $as_echo "$ac_try_echo"; } >&5
16492 (eval "$ac_try") 2>&5
16493 ac_status=$?
16494 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16495 test $ac_status = 0; } &&
16496 test -f conftest2.$ac_objext && { { case "(($ac_try" in
16497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16498 *) ac_try_echo=$ac_try;;
16499 esac
16500 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
16501 $as_echo "$ac_try_echo"; } >&5
16502 (eval "$ac_try") 2>&5
16503 ac_status=$?
16504 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16505 test $ac_status = 0; };
16506 then
16507 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
16508 if test "x$CC" != xcc; then
16509 # Test first that cc exists at all.
16510 if { ac_try='cc -c conftest.$ac_ext >&5'
16511 { { case "(($ac_try" in
16512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16513 *) ac_try_echo=$ac_try;;
16514 esac
16515 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
16516 $as_echo "$ac_try_echo"; } >&5
16517 (eval "$ac_try") 2>&5
16518 ac_status=$?
16519 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16520 test $ac_status = 0; }; }; then
16521 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
16522 rm -f conftest2.*
16523 if { { case "(($ac_try" in
16524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16525 *) ac_try_echo=$ac_try;;
16526 esac
16527 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
16528 $as_echo "$ac_try_echo"; } >&5
16529 (eval "$ac_try") 2>&5
16530 ac_status=$?
16531 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16532 test $ac_status = 0; } &&
16533 test -f conftest2.$ac_objext && { { case "(($ac_try" in
16534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16535 *) ac_try_echo=$ac_try;;
16536 esac
16537 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
16538 $as_echo "$ac_try_echo"; } >&5
16539 (eval "$ac_try") 2>&5
16540 ac_status=$?
16541 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16542 test $ac_status = 0; };
16543 then
16544 # cc works too.
16545 :
16546 else
16547 # cc exists but doesn't like -o.
16548 eval ac_cv_prog_cc_${ac_cc}_c_o=no
16549 fi
16550 fi
16551 fi
16552 else
16553 eval ac_cv_prog_cc_${ac_cc}_c_o=no
16554 fi
16555 rm -f core conftest*
16556
16557 fi
16558 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
16559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16560 $as_echo "yes" >&6; }
16561 else
16562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16563 $as_echo "no" >&6; }
16564
16565 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
16566
16567 fi
16568
16569 # FIXME: we rely on the cache variable name because
16570 # there is no other way.
16571 set dummy $CC
16572 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
16573 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
16574 if test "$am_t" != yes; then
16575 # Losing compiler, so override with the script.
16576 # FIXME: It is wrong to rewrite CC.
16577 # But if we don't then we get into trouble of one sort or another.
16578 # A longer-term fix would be to have automake use am__CC in this case,
16579 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
16580 CC="$am_aux_dir/compile $CC"
16581 fi
16582
1658316665
1658416666
1658516667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
1665916741 $as_echo "$ac_cv_path_EGREP" >&6; }
1666016742 EGREP="$ac_cv_path_EGREP"
1666116743
16744
16745 for ac_prog in gawk mawk nawk awk
16746 do
16747 # Extract the first word of "$ac_prog", so it can be a program name with args.
16748 set dummy $ac_prog; ac_word=$2
16749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16750 $as_echo_n "checking for $ac_word... " >&6; }
16751 if ${ac_cv_prog_AWK+:} false; then :
16752 $as_echo_n "(cached) " >&6
16753 else
16754 if test -n "$AWK"; then
16755 ac_cv_prog_AWK="$AWK" # Let the user override the test.
16756 else
16757 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16758 for as_dir in $PATH
16759 do
16760 IFS=$as_save_IFS
16761 test -z "$as_dir" && as_dir=.
16762 for ac_exec_ext in '' $ac_executable_extensions; do
16763 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16764 ac_cv_prog_AWK="$ac_prog"
16765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16766 break 2
16767 fi
16768 done
16769 done
16770 IFS=$as_save_IFS
16771
16772 fi
16773 fi
16774 AWK=$ac_cv_prog_AWK
16775 if test -n "$AWK"; then
16776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
16777 $as_echo "$AWK" >&6; }
16778 else
16779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16780 $as_echo "no" >&6; }
16781 fi
16782
16783
16784 test -n "$AWK" && break
16785 done
1666216786
1666316787
1666416788 # Doxygen
2021320337
2021420338 fi
2021520339
20340 ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
20341 if test "x$ac_cv_func_setproctitle" = xyes; then :
20342 $as_echo "#define HAVE_SETPROCTITLE 1" >>confdefs.h
20343
20344 else
20345 case " $LIBOBJS " in
20346 *" setproctitle.$ac_objext "* ) ;;
20347 *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext"
20348 ;;
20349 esac
20350
20351 fi
20352
20353
20354 for ac_func in setproctitle_init
20355 do :
20356 ac_fn_c_check_func "$LINENO" "setproctitle_init" "ac_cv_func_setproctitle_init"
20357 if test "x$ac_cv_func_setproctitle_init" = xyes; then :
20358 cat >>confdefs.h <<_ACEOF
20359 #define HAVE_SETPROCTITLE_INIT 1
20360 _ACEOF
20361
20362 fi
20363 done
20364
2021620365 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
2021720366 if test "x$ac_cv_func_strlcpy" = xyes; then :
2021820367 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
2026020409 case " $LIBOBJS " in
2026120410 *" fgetln.$ac_objext "* ) ;;
2026220411 *) LIBOBJS="$LIBOBJS fgetln.$ac_objext"
20263 ;;
20264 esac
20265
20266 fi
20267
20268 ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
20269 if test "x$ac_cv_func_setproctitle" = xyes; then :
20270 $as_echo "#define HAVE_SETPROCTITLE 1" >>confdefs.h
20271
20272 else
20273 case " $LIBOBJS " in
20274 *" setproctitle.$ac_objext "* ) ;;
20275 *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext"
2027620412 ;;
2027720413 esac
2027820414
2030020436 ;;
2030120437 esac
2030220438
20303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing __res_init" >&5
20304 $as_echo_n "checking for library containing __res_init... " >&6; }
20305 if ${ac_cv_search___res_init+:} false; then :
20439 # Check for res_init. On OSX, res_init is a symbol in libsystem_info
20440 # and a macro in resolv.h. We need to ensure we test with resolv.h.
20441
20442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
20443 $as_echo_n "checking for library containing res_init... " >&6; }
20444 if ${ac_cv_search_res_init+:} false; then :
2030620445 $as_echo_n "(cached) " >&6
2030720446 else
2030820447 ac_func_search_save_LIBS=$LIBS
2030920448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031020449 /* end confdefs.h. */
2031120450
20312 /* Override any GCC internal prototype to avoid an error.
20313 Use char because int might match the return type of a GCC
20314 builtin and then its argument prototype would still apply. */
20315 #ifdef __cplusplus
20316 extern "C"
20317 #endif
20318 char __res_init ();
20319 int
20320 main ()
20321 {
20322 return __res_init ();
20323 ;
20324 return 0;
20325 }
20326 _ACEOF
20327 for ac_lib in '' resolv bind; do
20328 if test -z "$ac_lib"; then
20329 ac_res="none required"
20330 else
20331 ac_res=-l$ac_lib
20332 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20333 fi
20334 if ac_fn_c_try_link "$LINENO"; then :
20335 ac_cv_search___res_init=$ac_res
20336 fi
20337 rm -f core conftest.err conftest.$ac_objext \
20338 conftest$ac_exeext
20339 if ${ac_cv_search___res_init+:} false; then :
20340 break
20341 fi
20342 done
20343 if ${ac_cv_search___res_init+:} false; then :
20344
20345 else
20346 ac_cv_search___res_init=no
20347 fi
20348 rm conftest.$ac_ext
20349 LIBS=$ac_func_search_save_LIBS
20350 fi
20351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search___res_init" >&5
20352 $as_echo "$ac_cv_search___res_init" >&6; }
20353 ac_res=$ac_cv_search___res_init
20354 if test "$ac_res" != no; then :
20355 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20356
20357 $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
20358
20359 else
20360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
20361 $as_echo_n "checking for library containing res_9_init... " >&6; }
20362 if ${ac_cv_search_res_9_init+:} false; then :
20363 $as_echo_n "(cached) " >&6
20364 else
20365 ac_func_search_save_LIBS=$LIBS
20366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20367 /* end confdefs.h. */
20368
20369 /* Override any GCC internal prototype to avoid an error.
20370 Use char because int might match the return type of a GCC
20371 builtin and then its argument prototype would still apply. */
20372 #ifdef __cplusplus
20373 extern "C"
20374 #endif
20375 char res_9_init ();
20376 int
20377 main ()
20378 {
20379 return res_9_init ();
20380 ;
20381 return 0;
20382 }
20383 _ACEOF
20384 for ac_lib in '' resolv bind; do
20385 if test -z "$ac_lib"; then
20386 ac_res="none required"
20387 else
20388 ac_res=-l$ac_lib
20389 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20390 fi
20391 if ac_fn_c_try_link "$LINENO"; then :
20392 ac_cv_search_res_9_init=$ac_res
20393 fi
20394 rm -f core conftest.err conftest.$ac_objext \
20395 conftest$ac_exeext
20396 if ${ac_cv_search_res_9_init+:} false; then :
20397 break
20398 fi
20399 done
20400 if ${ac_cv_search_res_9_init+:} false; then :
20401
20402 else
20403 ac_cv_search_res_9_init=no
20404 fi
20405 rm conftest.$ac_ext
20406 LIBS=$ac_func_search_save_LIBS
20407 fi
20408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
20409 $as_echo "$ac_cv_search_res_9_init" >&6; }
20410 ac_res=$ac_cv_search_res_9_init
20411 if test "$ac_res" != no; then :
20412 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20413
20414 $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
20415
20416 else
20417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
20418 $as_echo_n "checking for library containing res_init... " >&6; }
20419 if ${ac_cv_search_res_init+:} false; then :
20420 $as_echo_n "(cached) " >&6
20421 else
20422 ac_func_search_save_LIBS=$LIBS
20423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20424 /* end confdefs.h. */
20425
20426 /* Override any GCC internal prototype to avoid an error.
20427 Use char because int might match the return type of a GCC
20428 builtin and then its argument prototype would still apply. */
20429 #ifdef __cplusplus
20430 extern "C"
20431 #endif
20432 char res_init ();
20451
20452 #include <resolv.h>
2043320453 int
2043420454 main ()
2043520455 {
2047220492
2047320493 fi
2047420494
20475 fi
20476
20477 fi
2047820495
2047920496
2048020497 cat >confcache <<\_ACEOF
2173421751
2173521752 fi
2173621753
21754 # Seccomp
21755
21756 # Check whether --with-seccomp was given.
21757 if test "${with_seccomp+set}" = set; then :
21758 withval=$with_seccomp;
21759 else
21760 with_seccomp=no
21761 fi
21762
21763
21764 if test x"$with_seccomp" != x"no"; then
21765
21766 pkg_failed=no
21767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SECCOMP" >&5
21768 $as_echo_n "checking for SECCOMP... " >&6; }
21769
21770 if test -n "$SECCOMP_CFLAGS"; then
21771 pkg_cv_SECCOMP_CFLAGS="$SECCOMP_CFLAGS"
21772 elif test -n "$PKG_CONFIG"; then
21773 if test -n "$PKG_CONFIG" && \
21774 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libseccomp >= 1\""; } >&5
21775 ($PKG_CONFIG --exists --print-errors "libseccomp >= 1") 2>&5
21776 ac_status=$?
21777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21778 test $ac_status = 0; }; then
21779 pkg_cv_SECCOMP_CFLAGS=`$PKG_CONFIG --cflags "libseccomp >= 1" 2>/dev/null`
21780 test "x$?" != "x0" && pkg_failed=yes
21781 else
21782 pkg_failed=yes
21783 fi
21784 else
21785 pkg_failed=untried
21786 fi
21787 if test -n "$SECCOMP_LIBS"; then
21788 pkg_cv_SECCOMP_LIBS="$SECCOMP_LIBS"
21789 elif test -n "$PKG_CONFIG"; then
21790 if test -n "$PKG_CONFIG" && \
21791 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libseccomp >= 1\""; } >&5
21792 ($PKG_CONFIG --exists --print-errors "libseccomp >= 1") 2>&5
21793 ac_status=$?
21794 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21795 test $ac_status = 0; }; then
21796 pkg_cv_SECCOMP_LIBS=`$PKG_CONFIG --libs "libseccomp >= 1" 2>/dev/null`
21797 test "x$?" != "x0" && pkg_failed=yes
21798 else
21799 pkg_failed=yes
21800 fi
21801 else
21802 pkg_failed=untried
21803 fi
21804
21805
21806
21807 if test $pkg_failed = yes; then
21808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21809 $as_echo "no" >&6; }
21810
21811 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
21812 _pkg_short_errors_supported=yes
21813 else
21814 _pkg_short_errors_supported=no
21815 fi
21816 if test $_pkg_short_errors_supported = yes; then
21817 SECCOMP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libseccomp >= 1" 2>&1`
21818 else
21819 SECCOMP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libseccomp >= 1" 2>&1`
21820 fi
21821 # Put the nasty error message in config.log where it belongs
21822 echo "$SECCOMP_PKG_ERRORS" >&5
21823
21824
21825 if test x"$with_seccomp" = x"yes"; then
21826 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
21827 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
21828 as_fn_error $? "*** no seccomp support found
21829 See \`config.log' for more details" "$LINENO" 5; }
21830 fi
21831 with_seccomp=no
21832
21833 elif test $pkg_failed = untried; then
21834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21835 $as_echo "no" >&6; }
21836
21837 if test x"$with_seccomp" = x"yes"; then
21838 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
21839 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
21840 as_fn_error $? "*** no seccomp support found
21841 See \`config.log' for more details" "$LINENO" 5; }
21842 fi
21843 with_seccomp=no
21844
21845 else
21846 SECCOMP_CFLAGS=$pkg_cv_SECCOMP_CFLAGS
21847 SECCOMP_LIBS=$pkg_cv_SECCOMP_LIBS
21848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21849 $as_echo "yes" >&6; }
21850
21851
21852
21853
21854 cat >>confdefs.h <<_ACEOF
21855 #define USE_SECCOMP 1
21856 _ACEOF
21857
21858 with_seccomp=yes
21859
21860 fi
21861 fi
21862
21863
21864 # OS X launchd support
21865
21866
21867 # Check whether --with-launchddaemonsdir was given.
21868 if test "${with_launchddaemonsdir+set}" = set; then :
21869 withval=$with_launchddaemonsdir;
21870
21871 cat >>confdefs.h <<_ACEOF
21872 #define LAUNCHDDAEMONSDIR "$withval"
21873 _ACEOF
21874
21875 LAUNCHDDAEMONSDIR=$withval
21876
21877 else
21878
21879
21880 cat >>confdefs.h <<_ACEOF
21881 #define LAUNCHDDAEMONSDIR "/Library/LaunchDaemons"
21882 _ACEOF
21883
21884 LAUNCHDDAEMONSDIR=/Library/LaunchDaemons
21885
21886 eval with_launchddaemonsdir="/Library/LaunchDaemons"
21887
21888 fi
21889
21890 launchddaemonsdir=$with_launchddaemonsdir
21891
21892 if test -n "$with_launchddaemonsdir" -a "x$with_launchddaemonsdir" != xno ; then
21893 HAVE_LAUNCHDDAEMONSDIR_TRUE=
21894 HAVE_LAUNCHDDAEMONSDIR_FALSE='#'
21895 else
21896 HAVE_LAUNCHDDAEMONSDIR_TRUE='#'
21897 HAVE_LAUNCHDDAEMONSDIR_FALSE=
21898 fi
21899
21900
21901 # Systemd
21902
21903
21904 # Check whether --with-systemdsystemunitdir was given.
21905 if test "${with_systemdsystemunitdir+set}" = set; then :
21906 withval=$with_systemdsystemunitdir;
21907
21908 cat >>confdefs.h <<_ACEOF
21909 #define SYSTEMDSYSTEMUNITDIR "$withval"
21910 _ACEOF
21911
21912 SYSTEMDSYSTEMUNITDIR=$withval
21913
21914 else
21915
21916
21917 cat >>confdefs.h <<_ACEOF
21918 #define SYSTEMDSYSTEMUNITDIR "$($PKG_CONFIG --variable=systemdsystemunitdir systemd)"
21919 _ACEOF
21920
21921 SYSTEMDSYSTEMUNITDIR=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
21922
21923 eval with_systemdsystemunitdir="$($PKG_CONFIG --variable=systemdsystemunitdir systemd)"
21924
21925 fi
21926
21927 systemdsystemunitdir=$with_systemdsystemunitdir
21928
21929 if test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ; then
21930 HAVE_SYSTEMDSYSTEMUNITDIR_TRUE=
21931 HAVE_SYSTEMDSYSTEMUNITDIR_FALSE='#'
21932 else
21933 HAVE_SYSTEMDSYSTEMUNITDIR_TRUE='#'
21934 HAVE_SYSTEMDSYSTEMUNITDIR_FALSE=
21935 fi
21936
21937
21938 # Systemtap/DTrace
21939
21940 # Enable systemtap support
21941
21942 # Check whether --enable-dtrace was given.
21943 if test "${enable_dtrace+set}" = set; then :
21944 enableval=$enable_dtrace; enable_dtrace=$enableval
21945 else
21946 enable_dtrace=no
21947 fi
21948
21949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable systemtap/DTrace trace support" >&5
21950 $as_echo_n "checking whether to enable systemtap/DTrace trace support... " >&6; }
21951 if test x"$enable_dtrace" = x"yes"; then
21952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21953 $as_echo "yes" >&6; }
21954
21955 $as_echo "#define ENABLE_DTRACE /**/" >>confdefs.h
21956
21957 else
21958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21959 $as_echo "no" >&6; }
21960 fi
21961
21962 if test x"$enable_dtrace" = x"yes"; then
21963 ENABLE_SYSTEMTAP_TRUE=
21964 ENABLE_SYSTEMTAP_FALSE='#'
21965 else
21966 ENABLE_SYSTEMTAP_TRUE='#'
21967 ENABLE_SYSTEMTAP_FALSE=
21968 fi
21969
21970 if test x"$enable_dtrace" = x"yes"; then
21971 for ac_prog in dtrace
21972 do
21973 # Extract the first word of "$ac_prog", so it can be a program name with args.
21974 set dummy $ac_prog; ac_word=$2
21975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21976 $as_echo_n "checking for $ac_word... " >&6; }
21977 if ${ac_cv_prog_DTRACE+:} false; then :
21978 $as_echo_n "(cached) " >&6
21979 else
21980 if test -n "$DTRACE"; then
21981 ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
21982 else
21983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21984 for as_dir in $PATH
21985 do
21986 IFS=$as_save_IFS
21987 test -z "$as_dir" && as_dir=.
21988 for ac_exec_ext in '' $ac_executable_extensions; do
21989 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21990 ac_cv_prog_DTRACE="$ac_prog"
21991 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21992 break 2
21993 fi
21994 done
21995 done
21996 IFS=$as_save_IFS
21997
21998 fi
21999 fi
22000 DTRACE=$ac_cv_prog_DTRACE
22001 if test -n "$DTRACE"; then
22002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22003 $as_echo "$DTRACE" >&6; }
22004 else
22005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22006 $as_echo "no" >&6; }
22007 fi
22008
22009
22010 test -n "$DTRACE" && break
22011 done
22012
22013 if test -z "$DTRACE"; then
22014 as_fn_error $? "*** dtrace command not found" "$LINENO" 5
22015 fi
22016 ac_fn_c_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
22017 if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
22018
22019 else
22020 as_fn_error $? "*** no sys/sdt.h header found" "$LINENO" 5
22021 fi
22022
22023
22024 fi
22025
22026
2173722027 # Privsep settings
2173822028
2173922029
2175622046
2175722047 PRIVSEP_USER=_lldpd
2175822048
22049 eval with_privsep_user="_lldpd"
2175922050
2176022051 fi
2176122052
2178022071
2178122072 PRIVSEP_GROUP=_lldpd
2178222073
22074 eval with_privsep_group="_lldpd"
2178322075
2178422076 fi
2178522077
2180422096
2180522097 PRIVSEP_CHROOT=/var/run/lldpd
2180622098
22099 eval with_privsep_chroot="/var/run/lldpd"
2180722100
2180822101 fi
2180922102
2201422307 else
2201522308 USE_JSON_TRUE='#'
2201622309 USE_JSON_FALSE=
22310 fi
22311
22312 if test x"$with_seccomp" = x"yes"; then
22313 USE_SECCOMP_TRUE=
22314 USE_SECCOMP_FALSE='#'
22315 else
22316 USE_SECCOMP_TRUE='#'
22317 USE_SECCOMP_FALSE=
2201722318 fi
2201822319
2201922320 cat >confcache <<\_ACEOF
2223722538 as_fn_error $? "conditional \"LIBEVENT_EMBEDDED\" was never defined.
2223822539 Usually this means the macro was only invoked conditionally." "$LINENO" 5
2223922540 fi
22541 if test -z "${HAVE_LAUNCHDDAEMONSDIR_TRUE}" && test -z "${HAVE_LAUNCHDDAEMONSDIR_FALSE}"; then
22542 as_fn_error $? "conditional \"HAVE_LAUNCHDDAEMONSDIR\" was never defined.
22543 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22544 fi
22545 if test -z "${HAVE_SYSTEMDSYSTEMUNITDIR_TRUE}" && test -z "${HAVE_SYSTEMDSYSTEMUNITDIR_FALSE}"; then
22546 as_fn_error $? "conditional \"HAVE_SYSTEMDSYSTEMUNITDIR\" was never defined.
22547 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22548 fi
22549 if test -z "${ENABLE_SYSTEMTAP_TRUE}" && test -z "${ENABLE_SYSTEMTAP_FALSE}"; then
22550 as_fn_error $? "conditional \"ENABLE_SYSTEMTAP\" was never defined.
22551 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22552 fi
2224022553 if test -z "${HAVE_CHECK_TRUE}" && test -z "${HAVE_CHECK_FALSE}"; then
2224122554 as_fn_error $? "conditional \"HAVE_CHECK\" was never defined.
2224222555 Usually this means the macro was only invoked conditionally." "$LINENO" 5
2225122564 fi
2225222565 if test -z "${USE_JSON_TRUE}" && test -z "${USE_JSON_FALSE}"; then
2225322566 as_fn_error $? "conditional \"USE_JSON\" was never defined.
22567 Usually this means the macro was only invoked conditionally." "$LINENO" 5
22568 fi
22569 if test -z "${USE_SECCOMP_TRUE}" && test -z "${USE_SECCOMP_FALSE}"; then
22570 as_fn_error $? "conditional \"USE_SECCOMP\" was never defined.
2225422571 Usually this means the macro was only invoked conditionally." "$LINENO" 5
2225522572 fi
2225622573
2265022967 # report actual input values of CONFIG_FILES etc. instead of their
2265122968 # values after options handling.
2265222969 ac_log="
22653 This file was extended by lldpd $as_me 0.7.6, which was
22970 This file was extended by lldpd $as_me 0.7.7, which was
2265422971 generated by GNU Autoconf 2.69. Invocation command line was
2265522972
2265622973 CONFIG_FILES = $CONFIG_FILES
2271623033 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2271723034 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
2271823035 ac_cs_version="\\
22719 lldpd config.status 0.7.6
23036 lldpd config.status 0.7.7
2272023037 configured by $0, generated by GNU Autoconf 2.69,
2272123038 with options \\"\$ac_cs_config\\"
2272223039
2323423551 "osx/im.bernat.lldpd.plist") CONFIG_FILES="$CONFIG_FILES osx/im.bernat.lldpd.plist" ;;
2323523552 "osx/scripts/preinstall") CONFIG_FILES="$CONFIG_FILES osx/scripts/preinstall" ;;
2323623553 "osx/scripts/postinstall") CONFIG_FILES="$CONFIG_FILES osx/scripts/postinstall" ;;
23554 "src/daemon/lldpd.service") CONFIG_FILES="$CONFIG_FILES src/daemon/lldpd.service" ;;
2323723555 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
2323823556 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
2323923557
2493525253 XML output.....: ${with_xml-no}
2493625254 JSON output....: ${with_json-no}
2493725255 Oldies support.: $enable_oldies
25256 seccomp........: ${with_seccomp-no}
2493825257 ---------------------------------------------
2493925258
2494025259 Check the above options and compile with:
1818 AC_CONFIG_FILES([osx/Makefile osx/distribution.xml osx/im.bernat.lldpd.plist])
1919 AC_CONFIG_FILES([osx/scripts/preinstall], [chmod +x osx/scripts/preinstall])
2020 AC_CONFIG_FILES([osx/scripts/postinstall], [chmod +x osx/scripts/postinstall])
21 AC_CONFIG_FILES([src/daemon/lldpd.service])
2122 AC_CONFIG_MACRO_DIR([m4])
2223 AC_SUBST([CONFIGURE_ARGS], [$ac_configure_args])
2324
4445 AC_PROG_LIBTOOL
4546 AC_PROG_LN_S
4647 AC_PROG_EGREP
48 AC_PROG_AWK
4749
4850 # Doxygen
4951 DX_HTML_FEATURE(ON)
9698 AC_FUNC_MALLOC
9799 AC_FUNC_REALLOC
98100 AC_SEARCH_LIBS([setproctitle], [util bsd])
99 AC_REPLACE_FUNCS([strlcpy strnlen strndup fgetln setproctitle])
101 AC_REPLACE_FUNCS([setproctitle])
102 AC_CHECK_FUNCS([setproctitle_init])
103 AC_REPLACE_FUNCS([strlcpy strnlen strndup fgetln])
100104 AC_CHECK_FUNCS([setresuid setresgid])
101105
102106 case " $LIBS " in
105109 ;;
106110 esac
107111
108 AC_SEARCH_LIBS([__res_init], resolv bind, AC_DEFINE([HAVE_RES_INIT], 1, [Define to indicate that res_init() exists]),
109 AC_SEARCH_LIBS([res_9_init], resolv bind, AC_DEFINE([HAVE_RES_INIT], 1, [Define to indicate that res_init() exists]),
110 AC_SEARCH_LIBS([res_init], resolv bind, AC_DEFINE([HAVE_RES_INIT], 1, [Define to indicate that res_init() exists]))))
112 # Check for res_init. On OSX, res_init is a symbol in libsystem_info
113 # and a macro in resolv.h. We need to ensure we test with resolv.h.
114 m4_pushdef([AC_LANG_CALL(C)], [
115 AC_LANG_PROGRAM([$1
116 @%:@include <resolv.h>], [return $2 ();])])
117 AC_SEARCH_LIBS([res_init], resolv bind,
118 AC_DEFINE([HAVE_RES_INIT], 1,
119 [Define to indicate that res_init() exists]))
120 m4_popdef([AC_LANG_CALL(C)])
111121
112122 AC_CACHE_SAVE
113123
150160
151161 # XML
152162 AC_ARG_WITH([xml],
153 AC_HELP_STRING(
163 AS_HELP_STRING(
154164 [--with-xml],
155165 [Enable XML output via libxml2 @<:@default=no@:>@]
156166 ))
160170
161171 # JSON
162172 AC_ARG_WITH([json],
163 AC_HELP_STRING(
173 AS_HELP_STRING(
164174 [--with-json],
165175 [Enable JSON output via Jansson @<:@default=no@:>@]
166176 ))
168178 lldp_CHECK_JANSSON
169179 fi
170180
181 # Seccomp
182 AC_ARG_WITH([seccomp],
183 AS_HELP_STRING(
184 [--with-seccomp],
185 [Enable seccomp support (with libseccomp) @<:@default=no@:>@]),
186 [],
187 [with_seccomp=no])
188 lldp_CHECK_SECCOMP
189
190 # OS X launchd support
191 lldp_ARG_WITH([launchddaemonsdir], [Directory for launchd configuration file (OSX)],
192 [/Library/LaunchDaemons])
193 AC_SUBST([launchddaemonsdir], [$with_launchddaemonsdir])
194 AM_CONDITIONAL(HAVE_LAUNCHDDAEMONSDIR,
195 [test -n "$with_launchddaemonsdir" -a "x$with_launchddaemonsdir" != xno ])
196
197 # Systemd
198 lldp_ARG_WITH([systemdsystemunitdir], [Directory for systemd service files],
199 [$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
200 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
201 AM_CONDITIONAL(HAVE_SYSTEMDSYSTEMUNITDIR,
202 [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
203
204 # Systemtap/DTrace
205 lldp_SYSTEMTAP
206
171207 # Privsep settings
172208 lldp_ARG_WITH([privsep-user], [Which user to use for privilege separation], [_lldpd])
173209 lldp_ARG_WITH([privsep-group], [Which group to use for privilege separation], [_lldpd])
193229 AM_CONDITIONAL([USE_SNMP], [test x"$with_snmp" = x"yes"])
194230 AM_CONDITIONAL([USE_XML], [test x"$with_xml" = x"yes"])
195231 AM_CONDITIONAL([USE_JSON], [test x"$with_json" = x"yes"])
232 AM_CONDITIONAL([USE_SECCOMP], [test x"$with_seccomp" = x"yes"])
196233 AC_OUTPUT
197234
198235 if test x"$LIBEVENT_EMBEDDED" = x; then
223260 XML output.....: ${with_xml-no}
224261 JSON output....: ${with_json-no}
225262 Oldies support.: $enable_oldies
263 seccomp........: ${with_seccomp-no}
226264 ---------------------------------------------
227265
228266 Check the above options and compile with:
0 # Makefile.in generated by automake 1.13.3 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
33 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
714714 $(am__aclocal_m4_deps):
715715
716716 config.h: stamp-h1
717 @if test ! -f $@; then rm -f stamp-h1; else :; fi
718 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
717 @test -f $@ || rm -f stamp-h1
718 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
719719
720720 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
721721 @rm -f stamp-h1
875875 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
876876 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
877877 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
878 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
878 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
879879
880880 .c.obj:
881881 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
882882 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
883883 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
884884 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
885 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
885 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
886886
887887 .c.lo:
888888 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
11291129 $(am__post_remove_distdir)
11301130
11311131 dist-tarZ: distdir
1132 @echo WARNING: "Support for shar distribution archives is" \
1133 "deprecated." >&2
1134 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
11321135 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
11331136 $(am__post_remove_distdir)
11341137
11351138 dist-shar: distdir
1139 @echo WARNING: "Support for distribution archives compressed with" \
1140 "legacy program 'compress' is deprecated." >&2
1141 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
11361142 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
11371143 $(am__post_remove_distdir)
11381144
0 # generated automatically by aclocal 1.13.3 -*- Autoconf -*-
0 # generated automatically by aclocal 1.14 -*- Autoconf -*-
11
22 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
33
3131 # generated from the m4 files accompanying Automake X.Y.
3232 # (This private macro should not be called outside this file.)
3333 AC_DEFUN([AM_AUTOMAKE_VERSION],
34 [am__api_version='1.13'
34 [am__api_version='1.14'
3535 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3636 dnl require some minimum version. Point them to the right macro.
37 m4_if([$1], [1.13.3], [],
37 m4_if([$1], [1.14], [],
3838 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
3939 ])
4040
5050 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
5151 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
5252 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53 [AM_AUTOMAKE_VERSION([1.13.3])dnl
53 [AM_AUTOMAKE_VERSION([1.14])dnl
5454 m4_ifndef([AC_AUTOCONF_VERSION],
5555 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
5656 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
417417 # This macro actually does too much. Some checks are only needed if
418418 # your package does certain things. But this isn't really a big deal.
419419
420 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
421 m4_define([AC_PROG_CC],
422 m4_defn([AC_PROG_CC])
423 [_AM_PROG_CC_C_O
424 ])
425
420426 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
421427 # AM_INIT_AUTOMAKE([OPTIONS])
422428 # -----------------------------------------------
525531 AC_CONFIG_COMMANDS_PRE(dnl
526532 [m4_provide_if([_AM_COMPILER_EXEEXT],
527533 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
528 ])
534
535 # POSIX will say in a future version that running "rm -f" with no argument
536 # is OK; and we want to be able to make that assumption in our Makefile
537 # recipes. So use an aggressive probe to check that the usage we want is
538 # actually supported "in the wild" to an acceptable degree.
539 # See automake bug#10828.
540 # To make any issue more visible, cause the running configure to be aborted
541 # by default if the 'rm' program in use doesn't match our expectations; the
542 # user can still override this though.
543 if rm -f && rm -fr && rm -rf; then : OK; else
544 cat >&2 <<'END'
545 Oops!
546
547 Your 'rm' program seems unable to run without file operands specified
548 on the command line, even when the '-f' option is present. This is contrary
549 to the behaviour of most rm programs out there, and not conforming with
550 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
551
552 Please tell bug-automake@gnu.org about your system, including the value
553 of your $PATH and any error possibly output before this message. This
554 can help us improve future automake versions.
555
556 END
557 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
558 echo 'Configuration will proceed anyway, since you have set the' >&2
559 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
560 echo >&2
561 else
562 cat >&2 <<'END'
563 Aborting the configuration process, to ensure you take notice of the issue.
564
565 You can download and install GNU coreutils to get an 'rm' implementation
566 that behaves properly: <http://www.gnu.org/software/coreutils/>.
567
568 If you want to complete the configuration process using your problematic
569 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
570 to "yes", and re-run configure.
571
572 END
573 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
574 fi
575 fi])
529576
530577 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
531578 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
532579 dnl mangled by Autoconf and run in a shell conditional statement.
533580 m4_define([_AC_COMPILER_EXEEXT],
534581 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
535
536582
537583 # When config.status generates a header, we must update the stamp-h file.
538584 # This file resides in the same directory as the config header
645691 rm -f confinc confmf
646692 ])
647693
648 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
649 #
650 # This file is free software; the Free Software Foundation
651 # gives unlimited permission to copy and/or distribute it,
652 # with or without modifications, as long as this notice is preserved.
653
654 # AM_PROG_CC_C_O
655 # --------------
656 # Like AC_PROG_CC_C_O, but changed for automake.
657 AC_DEFUN([AM_PROG_CC_C_O],
658 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
659 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
660 AC_REQUIRE_AUX_FILE([compile])dnl
661 # FIXME: we rely on the cache variable name because
662 # there is no other way.
663 set dummy $CC
664 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
665 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
666 if test "$am_t" != yes; then
667 # Losing compiler, so override with the script.
668 # FIXME: It is wrong to rewrite CC.
669 # But if we don't then we get into trouble of one sort or another.
670 # A longer-term fix would be to have automake use am__CC in this case,
671 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
672 CC="$am_aux_dir/compile $CC"
673 fi
674 dnl Make sure AC_PROG_CC is never called again, or it will override our
675 dnl setting of CC.
676 m4_define([AC_PROG_CC],
677 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
678 ])
679
680694 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
681695
682696 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
746760 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
747761 AC_DEFUN([_AM_IF_OPTION],
748762 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
763
764 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
765 #
766 # This file is free software; the Free Software Foundation
767 # gives unlimited permission to copy and/or distribute it,
768 # with or without modifications, as long as this notice is preserved.
769
770 # _AM_PROG_CC_C_O
771 # ---------------
772 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
773 # to automatically call this.
774 AC_DEFUN([_AM_PROG_CC_C_O],
775 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
776 AC_REQUIRE_AUX_FILE([compile])dnl
777 AC_LANG_PUSH([C])dnl
778 AC_CACHE_CHECK(
779 [whether $CC understands -c and -o together],
780 [am_cv_prog_cc_c_o],
781 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
782 # Make sure it works both with $CC and with simple cc.
783 # Following AC_PROG_CC_C_O, we do the test twice because some
784 # compilers refuse to overwrite an existing .o file with -o,
785 # though they will create one.
786 am_cv_prog_cc_c_o=yes
787 for am_i in 1 2; do
788 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
789 && test -f conftest2.$ac_objext; then
790 : OK
791 else
792 am_cv_prog_cc_c_o=no
793 break
794 fi
795 done
796 rm -f core conftest*
797 unset am_i])
798 if test "$am_cv_prog_cc_c_o" != yes; then
799 # Losing compiler, so override with the script.
800 # FIXME: It is wrong to rewrite CC.
801 # But if we don't then we get into trouble of one sort or another.
802 # A longer-term fix would be to have automake use am__CC in this case,
803 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
804 CC="$am_aux_dir/compile $CC"
805 fi
806 AC_LANG_POP([C])])
807
808 # For backward compatibility.
809 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
810
811 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
812 #
813 # This file is free software; the Free Software Foundation
814 # gives unlimited permission to copy and/or distribute it,
815 # with or without modifications, as long as this notice is preserved.
816
817 # AM_RUN_LOG(COMMAND)
818 # -------------------
819 # Run COMMAND, save the exit status in ac_status, and log it.
820 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
821 AC_DEFUN([AM_RUN_LOG],
822 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
823 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
824 ac_status=$?
825 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
826 (exit $ac_status); }])
749827
750828 # Check to make sure that the build environment is sane. -*- Autoconf -*-
751829
351351 /* Define to the sub-directory in which libtool stores uninstalled libraries.
352352 */
353353 #undef LT_OBJDIR
354
355 /* Define to 1 if your C compiler doesn't accept -c and -o together. */
356 #undef NO_MINUS_C_MINUS_O
357354
358355 /* Numeric representation of the version */
359356 #undef NUMERIC_VERSION
25982598
25992599
26002600
2601 am__api_version='1.13'
2601 am__api_version='1.14'
26022602
26032603 ac_aux_dir=
26042604 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
31653165
31663166
31673167
3168 # POSIX will say in a future version that running "rm -f" with no argument
3169 # is OK; and we want to be able to make that assumption in our Makefile
3170 # recipes. So use an aggressive probe to check that the usage we want is
3171 # actually supported "in the wild" to an acceptable degree.
3172 # See automake bug#10828.
3173 # To make any issue more visible, cause the running configure to be aborted
3174 # by default if the 'rm' program in use doesn't match our expectations; the
3175 # user can still override this though.
3176 if rm -f && rm -fr && rm -rf; then : OK; else
3177 cat >&2 <<'END'
3178 Oops!
3179
3180 Your 'rm' program seems unable to run without file operands specified
3181 on the command line, even when the '-f' option is present. This is contrary
3182 to the behaviour of most rm programs out there, and not conforming with
3183 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3184
3185 Please tell bug-automake@gnu.org about your system, including the value
3186 of your $PATH and any error possibly output before this message. This
3187 can help us improve future automake versions.
3188
3189 END
3190 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3191 echo 'Configuration will proceed anyway, since you have set the' >&2
3192 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3193 echo >&2
3194 else
3195 cat >&2 <<'END'
3196 Aborting the configuration process, to ensure you take notice of the issue.
3197
3198 You can download and install GNU coreutils to get an 'rm' implementation
3199 that behaves properly: <http://www.gnu.org/software/coreutils/>.
3200
3201 If you want to complete the configuration process using your problematic
3202 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3203 to "yes", and re-run configure.
3204
3205 END
3206 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3207 fi
3208 fi
31683209 ac_config_headers="$ac_config_headers config.h"
31693210
31703211
40424083 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40434084 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40444085 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4086
4087 ac_ext=c
4088 ac_cpp='$CPP $CPPFLAGS'
4089 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4090 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4091 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4093 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4094 if ${am_cv_prog_cc_c_o+:} false; then :
4095 $as_echo_n "(cached) " >&6
4096 else
4097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4098 /* end confdefs.h. */
4099
4100 int
4101 main ()
4102 {
4103
4104 ;
4105 return 0;
4106 }
4107 _ACEOF
4108 # Make sure it works both with $CC and with simple cc.
4109 # Following AC_PROG_CC_C_O, we do the test twice because some
4110 # compilers refuse to overwrite an existing .o file with -o,
4111 # though they will create one.
4112 am_cv_prog_cc_c_o=yes
4113 for am_i in 1 2; do
4114 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4115 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4116 ac_status=$?
4117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4118 (exit $ac_status); } \
4119 && test -f conftest2.$ac_objext; then
4120 : OK
4121 else
4122 am_cv_prog_cc_c_o=no
4123 break
4124 fi
4125 done
4126 rm -f core conftest*
4127 unset am_i
4128 fi
4129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4130 $as_echo "$am_cv_prog_cc_c_o" >&6; }
4131 if test "$am_cv_prog_cc_c_o" != yes; then
4132 # Losing compiler, so override with the script.
4133 # FIXME: It is wrong to rewrite CC.
4134 # But if we don't then we get into trouble of one sort or another.
4135 # A longer-term fix would be to have automake use am__CC in this case,
4136 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4137 CC="$am_aux_dir/compile $CC"
4138 fi
4139 ac_ext=c
4140 ac_cpp='$CPP $CPPFLAGS'
4141 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4142 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4143 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4144
40454145 DEPDIR="${am__leading_dot}deps"
40464146
40474147 ac_config_commands="$ac_config_commands depfiles"
42334333 am__fastdepCC_FALSE=
42344334 fi
42354335
4236
4237 if test "x$CC" != xcc; then
4238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
4239 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
4240 else
4241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
4242 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
4243 fi
4244 set dummy $CC; ac_cc=`$as_echo "$2" |
4245 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4246 if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
4247 $as_echo_n "(cached) " >&6
4248 else
4249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4250 /* end confdefs.h. */
4251
4252 int
4253 main ()
4254 {
4255
4256 ;
4257 return 0;
4258 }
4259 _ACEOF
4260 # Make sure it works both with $CC and with simple cc.
4261 # We do the test twice because some compilers refuse to overwrite an
4262 # existing .o file with -o, though they will create one.
4263 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4264 rm -f conftest2.*
4265 if { { case "(($ac_try" in
4266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4267 *) ac_try_echo=$ac_try;;
4268 esac
4269 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4270 $as_echo "$ac_try_echo"; } >&5
4271 (eval "$ac_try") 2>&5
4272 ac_status=$?
4273 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4274 test $ac_status = 0; } &&
4275 test -f conftest2.$ac_objext && { { case "(($ac_try" in
4276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4277 *) ac_try_echo=$ac_try;;
4278 esac
4279 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4280 $as_echo "$ac_try_echo"; } >&5
4281 (eval "$ac_try") 2>&5
4282 ac_status=$?
4283 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4284 test $ac_status = 0; };
4285 then
4286 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
4287 if test "x$CC" != xcc; then
4288 # Test first that cc exists at all.
4289 if { ac_try='cc -c conftest.$ac_ext >&5'
4290 { { case "(($ac_try" in
4291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4292 *) ac_try_echo=$ac_try;;
4293 esac
4294 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4295 $as_echo "$ac_try_echo"; } >&5
4296 (eval "$ac_try") 2>&5
4297 ac_status=$?
4298 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4299 test $ac_status = 0; }; }; then
4300 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
4301 rm -f conftest2.*
4302 if { { case "(($ac_try" in
4303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4304 *) ac_try_echo=$ac_try;;
4305 esac
4306 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4307 $as_echo "$ac_try_echo"; } >&5
4308 (eval "$ac_try") 2>&5
4309 ac_status=$?
4310 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4311 test $ac_status = 0; } &&
4312 test -f conftest2.$ac_objext && { { case "(($ac_try" in
4313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4314 *) ac_try_echo=$ac_try;;
4315 esac
4316 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4317 $as_echo "$ac_try_echo"; } >&5
4318 (eval "$ac_try") 2>&5
4319 ac_status=$?
4320 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4321 test $ac_status = 0; };
4322 then
4323 # cc works too.
4324 :
4325 else
4326 # cc exists but doesn't like -o.
4327 eval ac_cv_prog_cc_${ac_cc}_c_o=no
4328 fi
4329 fi
4330 fi
4331 else
4332 eval ac_cv_prog_cc_${ac_cc}_c_o=no
4333 fi
4334 rm -f core conftest*
4335
4336 fi
4337 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
4338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4339 $as_echo "yes" >&6; }
4340 else
4341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4342 $as_echo "no" >&6; }
4343
4344 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
4345
4346 fi
4347
4348 # FIXME: we rely on the cache variable name because
4349 # there is no other way.
4350 set dummy $CC
4351 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
4352 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
4353 if test "$am_t" != yes; then
4354 # Losing compiler, so override with the script.
4355 # FIXME: It is wrong to rewrite CC.
4356 # But if we don't then we get into trouble of one sort or another.
4357 # A longer-term fix would be to have automake use am__CC in this case,
4358 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4359 CC="$am_aux_dir/compile $CC"
4360 fi
43614336
43624337
43634338
0 # Makefile.in generated by automake 1.13.3 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
33 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
0 # Makefile.in generated by automake 1.13.3 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
33 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
420420 -rm -f *.tab.c
421421
422422 .c.o:
423 $(AM_V_CC)$(COMPILE) -c $<
423 $(AM_V_CC)$(COMPILE) -c -o $@ $<
424424
425425 .c.obj:
426 $(AM_V_CC)$(COMPILE) -c `$(CYGPATH_W) '$<'`
426 $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
427427
428428 .c.lo:
429429 $(AM_V_CC)$(LTCOMPILE) -c -o $@ $<
0 # Makefile.in generated by automake 1.13.3 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
33 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
758758 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
759759 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
760760 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
761 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
761 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
762762
763763 .c.obj:
764764 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
765765 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
766766 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
767767 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
768 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
768 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
769769
770770 .c.lo:
771771 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
1111 AC_SUBST(AS_TR_CPP([$1]), [$withval])],[
1212 AC_DEFINE_UNQUOTED(AS_TR_CPP([$1]), ["$3"], [$2])
1313 AC_SUBST(AS_TR_CPP([$1]), [$3])
14 eval with_[]m4_translit([$1], [-+.], [___])="$3"
1415 ])])
1516
1617 dnl lldp_ARG_ENABLE(name, help1, default)
0 #
1 # lldp_CHECK_SECCOMP
2 #
3
4 AC_DEFUN([lldp_CHECK_SECCOMP], [
5 if test x"$with_seccomp" != x"no"; then
6 PKG_CHECK_MODULES([SECCOMP], [libseccomp >= 1], [
7 AC_SUBST([SECCOMP_LIBS])
8 AC_SUBST([SECCOMP_CFLAGS])
9 AC_DEFINE_UNQUOTED([USE_SECCOMP], 1, [Define to indicate to enable seccomp support])
10 with_seccomp=yes
11 ], [
12 if test x"$with_seccomp" = x"yes"; then
13 AC_MSG_FAILURE([*** no seccomp support found])
14 fi
15 with_seccomp=no
16 ])
17 fi
18 ])
0 #
1 # lldp_SYSTEMTAP
2 #
3 # Check for DTrace/Systemtap support
4
5 AC_DEFUN([lldp_SYSTEMTAP], [
6 # Enable systemtap support
7 lldp_ARG_ENABLE([dtrace], [systemtap/DTrace trace support], [no])
8 AM_CONDITIONAL([ENABLE_SYSTEMTAP], [test x"$enable_dtrace" = x"yes"])
9 if test x"$enable_dtrace" = x"yes"; then
10 AC_CHECK_PROGS(DTRACE, dtrace)
11 if test -z "$DTRACE"; then
12 AC_MSG_ERROR([*** dtrace command not found])
13 fi
14 AC_CHECK_HEADER([sys/sdt.h],,[AC_MSG_ERROR([*** no sys/sdt.h header found])])
15 fi
16 ])
5656 touch $@
5757
5858 # Install launchd plist
59 install-data-local:
60 install -m 0755 -d $(DESTDIR)/Library/LaunchDaemons
61 install -m 0644 im.bernat.lldpd.plist $(DESTDIR)/Library/LaunchDaemons
62 uninstall-local:
63 rm -rf $(DESTDIR)/Library/LaunchDaemons
64 clean-local:
65 rm -rf $(ARCHS)
66 rm -rf $(PKG_DIR)
67 rm -f stamp-*
68 rm -rf pkg.1
69 rm -f ../$(PKG_NAME)
59 if HAVE_LAUNCHDDAEMONSDIR
60 launchddaemons_DATA = im.bernat.lldpd.plist
61 endif
7062
7163 .PHONY: pkg requirements
7264
0 # Makefile.in generated by automake 1.13.3 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
33 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
1212 # PARTICULAR PURPOSE.
1313
1414 @SET_MAKE@
15
1516 VPATH = @srcdir@
1617 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
1718 am__make_running_with_option = \
9091 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
9192 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
9293 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/os.m4 \
93 $(top_srcdir)/m4/progname.m4 $(top_srcdir)/m4/snmp.m4 \
94 $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/xml2.m4 \
94 $(top_srcdir)/m4/progname.m4 $(top_srcdir)/m4/seccomp.m4 \
95 $(top_srcdir)/m4/snmp.m4 $(top_srcdir)/m4/stdint.m4 \
96 $(top_srcdir)/m4/systemtap.m4 $(top_srcdir)/m4/xml2.m4 \
9597 $(top_srcdir)/configure.ac
9698 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
9799 $(ACLOCAL_M4)
118120 n|no|NO) false;; \
119121 *) (install-info --version) >/dev/null 2>&1;; \
120122 esac
123 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
124 am__vpath_adj = case $$p in \
125 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
126 *) f=$$p;; \
127 esac;
128 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
129 am__install_max = 40
130 am__nobase_strip_setup = \
131 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
132 am__nobase_strip = \
133 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
134 am__nobase_list = $(am__nobase_strip_setup); \
135 for p in $$list; do echo "$$p $$p"; done | \
136 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
137 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
138 if (++n[$$2] == $(am__install_max)) \
139 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
140 END { for (dir in files) print dir, files[dir] }'
141 am__base_list = \
142 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
143 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
144 am__uninstall_files_from_dir = { \
145 test -z "$$files" \
146 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
147 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
148 $(am__cd) "$$dir" && rm -f $$files; }; \
149 }
150 am__installdirs = "$(DESTDIR)$(launchddaemonsdir)"
151 DATA = $(launchddaemons_DATA)
121152 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
122153 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
123154 ACLOCAL = @ACLOCAL@
146177 DLLTOOL = @DLLTOOL@
147178 DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
148179 DSYMUTIL = @DSYMUTIL@
180 DTRACE = @DTRACE@
149181 DUMPBIN = @DUMPBIN@
150182 DX_CONFIG = @DX_CONFIG@
151183 DX_DOCDIR = @DX_DOCDIR@
184216 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
185217 JANSSON_CFLAGS = @JANSSON_CFLAGS@
186218 JANSSON_LIBS = @JANSSON_LIBS@
219 LAUNCHDDAEMONSDIR = @LAUNCHDDAEMONSDIR@
187220 LD = @LD@
188221 LDFLAGS = @LDFLAGS@
189222 LIBEVENT_CFLAGS = @LIBEVENT_CFLAGS@
224257 PRIVSEP_USER = @PRIVSEP_USER@
225258 RANLIB = @RANLIB@
226259 READLINE_LIBS = @READLINE_LIBS@
260 SECCOMP_CFLAGS = @SECCOMP_CFLAGS@
261 SECCOMP_LIBS = @SECCOMP_LIBS@
227262 SED = @SED@
228263 SET_MAKE = @SET_MAKE@
229264 SHELL = @SHELL@
230265 STRIP = @STRIP@
266 SYSTEMDSYSTEMUNITDIR = @SYSTEMDSYSTEMUNITDIR@
231267 VERSION = @VERSION@
232268 XML2_CFLAGS = @XML2_CFLAGS@
233269 XML2_CONFIG = @XML2_CONFIG@
266302 includedir = @includedir@
267303 infodir = @infodir@
268304 install_sh = @install_sh@
305 launchddaemonsdir = @launchddaemonsdir@
269306 libdir = @libdir@
270307 libexecdir = @libexecdir@
271308 localedir = @localedir@
282319 srcdir = @srcdir@
283320 subdirs = @subdirs@
284321 sysconfdir = @sysconfdir@
322 systemdsystemunitdir = @systemdsystemunitdir@
285323 target_alias = @target_alias@
286324 top_build_prefix = @top_build_prefix@
287325 top_builddir = @top_builddir@
296334 @HOST_OS_OSX_TRUE@PKG_DIR = @PACKAGE@-@VERSION@
297335 @HOST_OS_OSX_TRUE@ARCHS = @host_cpu@
298336 @HOST_OS_OSX_TRUE@pkg_curarch = $(@:stamp-%=%)
337
338 # Install launchd plist
339 @HAVE_LAUNCHDDAEMONSDIR_TRUE@@HOST_OS_OSX_TRUE@launchddaemons_DATA = im.bernat.lldpd.plist
299340 all: all-am
300341
301342 .SUFFIXES:
339380
340381 clean-libtool:
341382 -rm -rf .libs _libs
383 install-launchddaemonsDATA: $(launchddaemons_DATA)
384 @$(NORMAL_INSTALL)
385 @list='$(launchddaemons_DATA)'; test -n "$(launchddaemonsdir)" || list=; \
386 if test -n "$$list"; then \
387 echo " $(MKDIR_P) '$(DESTDIR)$(launchddaemonsdir)'"; \
388 $(MKDIR_P) "$(DESTDIR)$(launchddaemonsdir)" || exit 1; \
389 fi; \
390 for p in $$list; do \
391 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
392 echo "$$d$$p"; \
393 done | $(am__base_list) | \
394 while read files; do \
395 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(launchddaemonsdir)'"; \
396 $(INSTALL_DATA) $$files "$(DESTDIR)$(launchddaemonsdir)" || exit $$?; \
397 done
398
399 uninstall-launchddaemonsDATA:
400 @$(NORMAL_UNINSTALL)
401 @list='$(launchddaemons_DATA)'; test -n "$(launchddaemonsdir)" || list=; \
402 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
403 dir='$(DESTDIR)$(launchddaemonsdir)'; $(am__uninstall_files_from_dir)
342404 tags TAGS:
343405
344406 ctags CTAGS:
378440 done
379441 check-am: all-am
380442 check: check-am
381 all-am: Makefile
443 all-am: Makefile $(DATA)
382444 installdirs:
445 for dir in "$(DESTDIR)$(launchddaemonsdir)"; do \
446 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
447 done
383448 install: install-am
384449 install-exec: install-exec-am
385450 install-data: install-data-am
410475 maintainer-clean-generic:
411476 @echo "This command is intended for maintainers to use"
412477 @echo "it deletes files that may require special tools to rebuild."
413 @HOST_OS_OSX_FALSE@uninstall-local:
414 @HOST_OS_OSX_FALSE@install-data-local:
415 @HOST_OS_OSX_FALSE@clean-local:
416478 clean: clean-am
417479
418 clean-am: clean-generic clean-libtool clean-local mostlyclean-am
480 clean-am: clean-generic clean-libtool mostlyclean-am
419481
420482 distclean: distclean-am
421483 -rm -f Makefile
433495
434496 info-am:
435497
436 install-data-am: install-data-local
498 install-data-am: install-launchddaemonsDATA
437499
438500 install-dvi: install-dvi-am
439501
477539
478540 ps-am:
479541
480 uninstall-am: uninstall-local
542 uninstall-am: uninstall-launchddaemonsDATA
481543
482544 .MAKE: install-am install-strip
483545
484546 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
485 clean-local cscopelist-am ctags-am distclean distclean-generic \
547 cscopelist-am ctags-am distclean distclean-generic \
486548 distclean-libtool distdir dvi dvi-am html html-am info info-am \
487 install install-am install-data install-data-am \
488 install-data-local install-dvi install-dvi-am install-exec \
489 install-exec-am install-html install-html-am install-info \
490 install-info-am install-man install-pdf install-pdf-am \
491 install-ps install-ps-am install-strip installcheck \
492 installcheck-am installdirs maintainer-clean \
549 install install-am install-data install-data-am install-dvi \
550 install-dvi-am install-exec install-exec-am install-html \
551 install-html-am install-info install-info-am \
552 install-launchddaemonsDATA install-man install-pdf \
553 install-pdf-am install-ps install-ps-am install-strip \
554 installcheck installcheck-am installdirs maintainer-clean \
493555 maintainer-clean-generic mostlyclean mostlyclean-generic \
494556 mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
495 uninstall-am uninstall-local
557 uninstall-am uninstall-launchddaemonsDATA
496558
497559 @HOST_OS_OSX_TRUE@requirements:
498560 @HOST_OS_OSX_TRUE@ @test -x $(PKGBUILD) || { echo "Needs pkgbuild ($(PKGBUILD))." ; exit 2 ; }
538600 @HOST_OS_OSX_TRUE@ $(MAKE) install DESTDIR=$(abs_builddir)/$(pkg_curarch)/$(PKG_DIR))
539601 @HOST_OS_OSX_TRUE@ touch $@
540602
541 # Install launchd plist
542 @HOST_OS_OSX_TRUE@install-data-local:
543 @HOST_OS_OSX_TRUE@ install -m 0755 -d $(DESTDIR)/Library/LaunchDaemons
544 @HOST_OS_OSX_TRUE@ install -m 0644 im.bernat.lldpd.plist $(DESTDIR)/Library/LaunchDaemons
545 @HOST_OS_OSX_TRUE@uninstall-local:
546 @HOST_OS_OSX_TRUE@ rm -rf $(DESTDIR)/Library/LaunchDaemons
547 @HOST_OS_OSX_TRUE@clean-local:
548 @HOST_OS_OSX_TRUE@ rm -rf $(ARCHS)
549 @HOST_OS_OSX_TRUE@ rm -rf $(PKG_DIR)
550 @HOST_OS_OSX_TRUE@ rm -f stamp-*
551 @HOST_OS_OSX_TRUE@ rm -rf pkg.1
552 @HOST_OS_OSX_TRUE@ rm -f ../$(PKG_NAME)
553
554603 @HOST_OS_OSX_TRUE@.PHONY: pkg requirements
555604
556605 # Tell versions [3.59,3.63) of GNU make to not export all variables.
0 # Makefile.in generated by automake 1.13.3 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
33 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
9191 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
9292 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
9393 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/os.m4 \
94 $(top_srcdir)/m4/progname.m4 $(top_srcdir)/m4/snmp.m4 \
95 $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/xml2.m4 \
94 $(top_srcdir)/m4/progname.m4 $(top_srcdir)/m4/seccomp.m4 \
95 $(top_srcdir)/m4/snmp.m4 $(top_srcdir)/m4/stdint.m4 \
96 $(top_srcdir)/m4/systemtap.m4 $(top_srcdir)/m4/xml2.m4 \
9697 $(top_srcdir)/configure.ac
9798 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
9899 $(ACLOCAL_M4)
232233 DLLTOOL = @DLLTOOL@
233234 DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
234235 DSYMUTIL = @DSYMUTIL@
236 DTRACE = @DTRACE@
235237 DUMPBIN = @DUMPBIN@
236238 DX_CONFIG = @DX_CONFIG@
237239 DX_DOCDIR = @DX_DOCDIR@
270272 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
271273 JANSSON_CFLAGS = @JANSSON_CFLAGS@
272274 JANSSON_LIBS = @JANSSON_LIBS@
275 LAUNCHDDAEMONSDIR = @LAUNCHDDAEMONSDIR@
273276 LD = @LD@
274277 LDFLAGS = @LDFLAGS@
275278 LIBEVENT_CFLAGS = @LIBEVENT_CFLAGS@
310313 PRIVSEP_USER = @PRIVSEP_USER@
311314 RANLIB = @RANLIB@
312315 READLINE_LIBS = @READLINE_LIBS@
316 SECCOMP_CFLAGS = @SECCOMP_CFLAGS@
317 SECCOMP_LIBS = @SECCOMP_LIBS@
313318 SED = @SED@
314319 SET_MAKE = @SET_MAKE@
315320 SHELL = @SHELL@
316321 STRIP = @STRIP@
322 SYSTEMDSYSTEMUNITDIR = @SYSTEMDSYSTEMUNITDIR@
317323 VERSION = @VERSION@
318324 XML2_CFLAGS = @XML2_CFLAGS@
319325 XML2_CONFIG = @XML2_CONFIG@
352358 includedir = @includedir@
353359 infodir = @infodir@
354360 install_sh = @install_sh@
361 launchddaemonsdir = @launchddaemonsdir@
355362 libdir = @libdir@
356363 libexecdir = @libexecdir@
357364 localedir = @localedir@
368375 srcdir = @srcdir@
369376 subdirs = @subdirs@
370377 sysconfdir = @sysconfdir@
378 systemdsystemunitdir = @systemdsystemunitdir@
371379 target_alias = @target_alias@
372380 top_build_prefix = @top_build_prefix@
373381 top_builddir = @top_builddir@
452460 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
453461 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
454462 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
455 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
463 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
456464
457465 .c.obj:
458466 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
459467 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
460468 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
461469 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
462 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
470 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
463471
464472 .c.lo:
465473 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
0 # Makefile.in generated by automake 1.13.3 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
33 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
9797 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
9898 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
9999 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/os.m4 \
100 $(top_srcdir)/m4/progname.m4 $(top_srcdir)/m4/snmp.m4 \
101 $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/xml2.m4 \
100 $(top_srcdir)/m4/progname.m4 $(top_srcdir)/m4/seccomp.m4 \
101 $(top_srcdir)/m4/snmp.m4 $(top_srcdir)/m4/stdint.m4 \
102 $(top_srcdir)/m4/systemtap.m4 $(top_srcdir)/m4/xml2.m4 \
102103 $(top_srcdir)/configure.ac
103104 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
104105 $(ACLOCAL_M4)
251252 DLLTOOL = @DLLTOOL@
252253 DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
253254 DSYMUTIL = @DSYMUTIL@
255 DTRACE = @DTRACE@
254256 DUMPBIN = @DUMPBIN@
255257 DX_CONFIG = @DX_CONFIG@
256258 DX_DOCDIR = @DX_DOCDIR@
289291 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
290292 JANSSON_CFLAGS = @JANSSON_CFLAGS@
291293 JANSSON_LIBS = @JANSSON_LIBS@
294 LAUNCHDDAEMONSDIR = @LAUNCHDDAEMONSDIR@
292295 LD = @LD@
293296 LDFLAGS = @LDFLAGS@
294297 LIBEVENT_CFLAGS = @LIBEVENT_CFLAGS@
329332 PRIVSEP_USER = @PRIVSEP_USER@
330333 RANLIB = @RANLIB@
331334 READLINE_LIBS = @READLINE_LIBS@
335 SECCOMP_CFLAGS = @SECCOMP_CFLAGS@
336 SECCOMP_LIBS = @SECCOMP_LIBS@
332337 SED = @SED@
333338 SET_MAKE = @SET_MAKE@
334339 SHELL = @SHELL@
335340 STRIP = @STRIP@
341 SYSTEMDSYSTEMUNITDIR = @SYSTEMDSYSTEMUNITDIR@
336342 VERSION = @VERSION@
337343 XML2_CFLAGS = @XML2_CFLAGS@
338344 XML2_CONFIG = @XML2_CONFIG@
371377 includedir = @includedir@
372378 infodir = @infodir@
373379 install_sh = @install_sh@
380 launchddaemonsdir = @launchddaemonsdir@
374381 libdir = @libdir@
375382 libexecdir = @libexecdir@
376383 localedir = @localedir@
387394 srcdir = @srcdir@
388395 subdirs = @subdirs@
389396 sysconfdir = @sysconfdir@
397 systemdsystemunitdir = @systemdsystemunitdir@
390398 target_alias = @target_alias@
391399 top_build_prefix = @top_build_prefix@
392400 top_builddir = @top_builddir@
517525 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
518526 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
519527 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
520 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
528 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
521529
522530 .c.obj:
523531 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
524532 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
525533 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
526534 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
527 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
535 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
528536
529537 .c.lo:
530538 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
100100 return 1;
101101 }
102102
103 static int
104 cmd_bondslave_srcmac_type(struct lldpctl_conn_t *conn, struct writer *w,
105 struct cmd_env *env, void *arg)
106 {
107 char *value_str;
108 int value = -1;
109
110 log_debug("lldpctl", "bond slave src mac");
111
112 lldpctl_atom_t *config = lldpctl_get_configuration(conn);
113 if (config == NULL) {
114 log_warnx("lldpctl",
115 "unable to get configuration from lldpd. %s",
116 lldpctl_last_strerror(conn));
117 return 0;
118 }
119
120 value_str = arg;
121 for (lldpctl_map_t *b_map =
122 lldpctl_key_get_map(lldpctl_k_config_bond_slave_src_mac_type);
123 b_map->string; b_map++) {
124 if (!strcmp(b_map->string, value_str)) {
125 value = b_map->value;
126 break;
127 }
128 }
129
130 if (value == -1) {
131 log_warnx("lldpctl", "invalid value");
132 return 0;
133 }
134
135 if (lldpctl_atom_set_int(config,
136 lldpctl_k_config_bond_slave_src_mac_type, value) == NULL) {
137 log_warnx("lldpctl", "unable to set bond slave src mac type."
138 " %s", lldpctl_last_strerror(conn));
139 lldpctl_atom_dec_ref(config);
140 return 0;
141 }
142
143 log_info("lldpctl", "bond slave src mac set to new value: %s",
144 value_str);
145 lldpctl_atom_dec_ref(config);
146
147 return 1;
148 }
149
150 /**
151 * Register `configure system bond-slave-src-mac-type`
152 */
153 static void
154 register_commands_srcmac_type(struct cmd_node *configure)
155 {
156 struct cmd_node *bond_slave_src_mac_type =
157 commands_new(configure,
158 "bond-slave-src-mac-type",
159 "Set LLDP bond slave source MAC type",
160 NULL, NULL, NULL);
161
162 for (lldpctl_map_t *b_map =
163 lldpctl_key_get_map(lldpctl_k_config_bond_slave_src_mac_type);
164 b_map->string; b_map++) {
165 if (!strcmp(b_map->string, "real")) {
166 commands_new(
167 commands_new(bond_slave_src_mac_type,
168 b_map->string, "Real mac",
169 NULL, NULL, NULL),
170 NEWLINE, NULL,
171 NULL, cmd_bondslave_srcmac_type,
172 b_map->string);
173 } else if (!strcmp(b_map->string, "zero")) {
174 commands_new(
175 commands_new(bond_slave_src_mac_type,
176 b_map->string, "All zero mac",
177 NULL, NULL, NULL),
178 NEWLINE, NULL,
179 NULL, cmd_bondslave_srcmac_type,
180 b_map->string);
181 } else if (!strcmp(b_map->string, "fixed")) {
182 commands_new(
183 commands_new(bond_slave_src_mac_type,
184 b_map->string, "Fixed value (3Com card)",
185 NULL, NULL, NULL),
186 NEWLINE, NULL,
187 NULL, cmd_bondslave_srcmac_type,
188 b_map->string);
189 } else if (!strcmp(b_map->string, "local")) {
190 commands_new(
191 commands_new(bond_slave_src_mac_type,
192 b_map->string, "Real Mac with locally "
193 "administered bit set",
194 NULL, NULL, NULL),
195 NEWLINE, NULL,
196 NULL, cmd_bondslave_srcmac_type,
197 b_map->string);
198 }
199 }
200 }
201
103202 /**
104203 * Register `configure system` commands.
105204 *
168267 NULL, NULL, NULL),
169268 NEWLINE, "Don't update interface descriptions with neighbor name",
170269 NULL, cmd_update_descriptions, NULL);
171 }
172
270
271 register_commands_srcmac_type(configure_system);
272 }
273
736736 "no":"yes");
737737 tag_datatag(w, "lldpmed-faststart-interval", "LLDP-MED fast start interval",
738738 N(lldpctl_atom_get_str(configuration, lldpctl_k_config_fast_start_interval)));
739 tag_datatag(w, "bond-slave-src-mac-type",
740 "Source MAC for LLDP frames on bond slaves",
741 lldpctl_atom_get_str(configuration,
742 lldpctl_k_config_bond_slave_src_mac_type));
739743
740744 tag_end(w);
741745 tag_end(w);
226226 the default TTL is 120 seconds.
227227 .Ed
228228
229 .Cd configure
230 .Cd system bond-slave-src-mac-type Ar value
231 .Bd -ragged -offset XXXXXX
232 Set the type of src mac in lldp frames sent on bond slaves
233
234 Valid types are:
235 .Bl -tag -width "XXX." -compact -offset XX
236 .It Sy real
237 Slave real mac
238 .It Sy zero
239 All zero mac
240 .It Sy fixed
241 An arbitrary fixed value (from a 3Com card)
242 .It Sy local
243 Real mac with locally administered bit set. If the real mac already
244 has the locally administered bit set, default to the fixed value.
245 .El
246 .Pp
247 Default value for
248 .Nm bond-slave-src-mac-type
249 is
250 .Nm fixed
251 .Ed
252
229253 .Cd configure med fast-start
230254 .Cd enable | tx-interval Ar interval
231255 .Bd -ragged -offset XXXXXX
410410 int ch, debug = 1, rc = EXIT_FAILURE;
411411 const char *fmt = "plain";
412412 lldpctl_conn_t *conn = NULL;
413 const char *options = is_lldpctl(argv[0])?"hdvf:":"hdsvf:c:";
413 const char *options = is_lldpctl(argv[0])?"hdvf:":"hdsvf:c:u:";
414414
415415 const char *ctlname = lldpctl_get_default_transport();
416416 int gotinputs = 0;
0 # Makefile.in generated by automake 1.13.3 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
33 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
7878 build_triplet = @build@
7979 host_triplet = @host@
8080 subdir = src/compat
81 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am realloc.c \
82 setproctitle.c strnlen.c malloc.c strlcpy.c fgetln.c strndup.c \
81 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am strlcpy.c \
82 realloc.c malloc.c strnlen.c strndup.c setproctitle.c fgetln.c \
8383 $(top_srcdir)/depcomp
8484 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
8585 am__aclocal_m4_deps = $(top_srcdir)/m4/args.m4 \
9191 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
9292 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
9393 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/os.m4 \
94 $(top_srcdir)/m4/progname.m4 $(top_srcdir)/m4/snmp.m4 \
95 $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/xml2.m4 \
94 $(top_srcdir)/m4/progname.m4 $(top_srcdir)/m4/seccomp.m4 \
95 $(top_srcdir)/m4/snmp.m4 $(top_srcdir)/m4/stdint.m4 \
96 $(top_srcdir)/m4/systemtap.m4 $(top_srcdir)/m4/xml2.m4 \
9697 $(top_srcdir)/configure.ac
9798 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
9899 $(ACLOCAL_M4)
195196 DLLTOOL = @DLLTOOL@
196197 DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
197198 DSYMUTIL = @DSYMUTIL@
199 DTRACE = @DTRACE@
198200 DUMPBIN = @DUMPBIN@
199201 DX_CONFIG = @DX_CONFIG@
200202 DX_DOCDIR = @DX_DOCDIR@
233235 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
234236 JANSSON_CFLAGS = @JANSSON_CFLAGS@
235237 JANSSON_LIBS = @JANSSON_LIBS@
238 LAUNCHDDAEMONSDIR = @LAUNCHDDAEMONSDIR@
236239 LD = @LD@
237240 LDFLAGS = @LDFLAGS@
238241 LIBEVENT_CFLAGS = @LIBEVENT_CFLAGS@
273276 PRIVSEP_USER = @PRIVSEP_USER@
274277 RANLIB = @RANLIB@
275278 READLINE_LIBS = @READLINE_LIBS@
279 SECCOMP_CFLAGS = @SECCOMP_CFLAGS@
280 SECCOMP_LIBS = @SECCOMP_LIBS@
276281 SED = @SED@
277282 SET_MAKE = @SET_MAKE@
278283 SHELL = @SHELL@
279284 STRIP = @STRIP@
285 SYSTEMDSYSTEMUNITDIR = @SYSTEMDSYSTEMUNITDIR@
280286 VERSION = @VERSION@
281287 XML2_CFLAGS = @XML2_CFLAGS@
282288 XML2_CONFIG = @XML2_CONFIG@
315321 includedir = @includedir@
316322 infodir = @infodir@
317323 install_sh = @install_sh@
324 launchddaemonsdir = @launchddaemonsdir@
318325 libdir = @libdir@
319326 libexecdir = @libexecdir@
320327 localedir = @localedir@
331338 srcdir = @srcdir@
332339 subdirs = @subdirs@
333340 sysconfdir = @sysconfdir@
341 systemdsystemunitdir = @systemdsystemunitdir@
334342 target_alias = @target_alias@
335343 top_build_prefix = @top_build_prefix@
336344 top_builddir = @top_builddir@
407415 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
408416 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
409417 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
410 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
418 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
411419
412420 .c.obj:
413421 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
414422 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
415423 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
416424 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
417 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
425 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
418426
419427 .c.lo:
420428 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
00 AM_CFLAGS = -I $(top_srcdir)/include
1 BUILT_SOURCES =
12
23 sbin_PROGRAMS = lldpd
34 dist_man_MANS = lldpd.8
56 noinst_LTLIBRARIES = liblldpd.la
67
78 ## Convenience library for lldpd and tests
9 nodist_liblldpd_la_SOURCES =
810 liblldpd_la_SOURCES = \
911 frame.h frame.c \
1012 lldp.c lldp-tlv.h \
1416 client.c \
1517 priv.c privsep_io.c \
1618 interfaces.c \
17 event.c lldpd.c
19 event.c lldpd.c \
20 probes.d trace.h
1821 liblldpd_la_CFLAGS = $(AM_CFLAGS) @LIBEVENT_CFLAGS@
1922 liblldpd_la_CPPFLAGS = -DSYSCONFDIR='"$(sysconfdir)"' -DLLDPCLI_PATH='"$(sbindir)/lldpcli"'
2023 liblldpd_la_LIBADD = \
8891 liblldpd_la_LIBADD += @NETSNMP_LIBS@
8992 endif
9093
94 # seccomp support
95 if USE_SECCOMP
96 BUILT_SOURCES += syscall-names.h
97 syscall-names.h:
98 echo "static const char *syscall_names[] = {" > $@ ;\
99 echo "#include <sys/syscall.h>" | cpp -dM | grep '^#define __NR_' | \
100 LC_ALL=C sed -r -n -e 's/^\#define[ \t]+__NR_([a-z0-9_]+)[ \t]+([0-9]+)(.*)/ [\2] = "\1",/p' >> $@ ;\
101 echo "};" >> $@
102 nodist_liblldpd_la_SOURCES += syscall-names.h
103 liblldpd_la_SOURCES += priv-seccomp.c
104 liblldpd_la_CFLAGS += @SECCOMP_CFLAGS@
105 liblldpd_la_LIBADD += @SECCOMP_LIBS@
106 endif
107
91108 ## lldpd
92109 lldpd_SOURCES = main.c
93110 lldpd_LDADD = liblldpd.la @LIBEVENT_LDFLAGS@
111
112 ## Systemtap/DTrace
113 EXTRA_DIST = dtrace2systemtap.awk
114 if ENABLE_SYSTEMTAP
115 BUILT_SOURCES += probes.h
116 probes.h: probes.d
117 $(AM_V_GEN)
118 $(AM_V_at)$(DTRACE) -C -h -s $< -o $@
119 probes.o: probes.d
120 $(AM_V_GEN)
121 $(AM_V_at)$(DTRACE) -C -G -s $< -o $@
122 lldpd_LDADD += probes.o
123
124 lldpd.stp: probes.d $(srcdir)/dtrace2systemtap.awk $(top_builddir)/config.status
125 $(AM_V_GEN)$(AWK) -f $(srcdir)/dtrace2systemtap.awk -v sbindir=$(sbindir) $< > $@ || ( rm -f $@ ; exit 1 )
126 tapsetdir = $(datadir)/systemtap/tapset
127 tapset_DATA = lldpd.stp
128 endif
94129
95130 ## libevent
96131 if LIBEVENT_EMBEDDED
98133 $(top_builddir)/libevent/libevent.la: $(top_srcdir)/libevent/*.c $(top_srcdir)/libevent/*.h
99134 (cd $(top_builddir)/libevent && $(MAKE))
100135 endif
136
137 ## systemd service file
138 if HAVE_SYSTEMDSYSTEMUNITDIR
139 systemdsystemunit_DATA = lldpd.service
140 endif
0 # Makefile.in generated by automake 1.13.3 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
33 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
1212 # PARTICULAR PURPOSE.
1313
1414 @SET_MAKE@
15
1516
1617
1718 VPATH = @srcdir@
133134 @USE_SNMP_TRUE@am__append_8 = agent.c agent_priv.c agent.h
134135 @USE_SNMP_TRUE@am__append_9 = @NETSNMP_CFLAGS@
135136 @USE_SNMP_TRUE@am__append_10 = @NETSNMP_LIBS@
137
138 # seccomp support
139 @USE_SECCOMP_TRUE@am__append_11 = syscall-names.h
140 @USE_SECCOMP_TRUE@am__append_12 = syscall-names.h
141 @USE_SECCOMP_TRUE@am__append_13 = priv-seccomp.c
142 @USE_SECCOMP_TRUE@am__append_14 = @SECCOMP_CFLAGS@
143 @USE_SECCOMP_TRUE@am__append_15 = @SECCOMP_LIBS@
144 @ENABLE_SYSTEMTAP_TRUE@am__append_16 = probes.h
145 @ENABLE_SYSTEMTAP_TRUE@am__append_17 = probes.o
136146 subdir = src/daemon
137147 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
138 $(top_srcdir)/depcomp $(dist_man_MANS)
148 $(srcdir)/lldpd.service.in $(top_srcdir)/depcomp \
149 $(dist_man_MANS)
139150 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
140151 am__aclocal_m4_deps = $(top_srcdir)/m4/args.m4 \
141152 $(top_srcdir)/m4/ax_cflags_gcc_option.m4 \
146157 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
147158 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
148159 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/os.m4 \
149 $(top_srcdir)/m4/progname.m4 $(top_srcdir)/m4/snmp.m4 \
150 $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/xml2.m4 \
160 $(top_srcdir)/m4/progname.m4 $(top_srcdir)/m4/seccomp.m4 \
161 $(top_srcdir)/m4/snmp.m4 $(top_srcdir)/m4/stdint.m4 \
162 $(top_srcdir)/m4/systemtap.m4 $(top_srcdir)/m4/xml2.m4 \
151163 $(top_srcdir)/configure.ac
152164 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
153165 $(ACLOCAL_M4)
154166 mkinstalldirs = $(install_sh) -d
155167 CONFIG_HEADER = $(top_builddir)/config.h
156 CONFIG_CLEAN_FILES =
168 CONFIG_CLEAN_FILES = lldpd.service
157169 CONFIG_CLEAN_VPATH_FILES =
158170 LTLIBRARIES = $(noinst_LTLIBRARIES)
159171 am__DEPENDENCIES_1 =
160172 liblldpd_la_DEPENDENCIES = \
161173 $(top_builddir)/src/libcommon-daemon-client.la \
162174 $(top_builddir)/src/libcommon-daemon-lib.la \
163 $(am__DEPENDENCIES_1)
175 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
164176 am__liblldpd_la_SOURCES_DIST = frame.h frame.c lldp.c lldp-tlv.h cdp.c \
165177 cdp.h sonmp.c sonmp.h edp.c edp.h client.c priv.c privsep_io.c \
166 interfaces.c event.c lldpd.c forward-linux.c \
178 interfaces.c event.c lldpd.c probes.d trace.h forward-linux.c \
167179 interfaces-linux.c netlink.c dmi-linux.c priv-linux.c \
168180 forward-bsd.c interfaces-bpf.c interfaces-bsd.c dmi-dummy.c \
169181 priv-bsd.c dmi-freebsd.c dmi-openbsd.c dmi-osx.c \
170182 forward-solaris.c interfaces-solaris.c agent.c agent_priv.c \
171 agent.h
183 agent.h priv-seccomp.c
172184 @HOST_OS_LINUX_TRUE@am__objects_1 = liblldpd_la-forward-linux.lo \
173185 @HOST_OS_LINUX_TRUE@ liblldpd_la-interfaces-linux.lo \
174186 @HOST_OS_LINUX_TRUE@ liblldpd_la-netlink.lo \
206218 @HOST_OS_SOLARIS_TRUE@ liblldpd_la-priv-bsd.lo
207219 @USE_SNMP_TRUE@am__objects_8 = liblldpd_la-agent.lo \
208220 @USE_SNMP_TRUE@ liblldpd_la-agent_priv.lo
221 @USE_SECCOMP_TRUE@am__objects_9 = liblldpd_la-priv-seccomp.lo
209222 am_liblldpd_la_OBJECTS = liblldpd_la-frame.lo liblldpd_la-lldp.lo \
210223 liblldpd_la-cdp.lo liblldpd_la-sonmp.lo liblldpd_la-edp.lo \
211224 liblldpd_la-client.lo liblldpd_la-priv.lo \
213226 liblldpd_la-event.lo liblldpd_la-lldpd.lo $(am__objects_1) \
214227 $(am__objects_2) $(am__objects_3) $(am__objects_4) \
215228 $(am__objects_5) $(am__objects_6) $(am__objects_7) \
216 $(am__objects_8)
217 liblldpd_la_OBJECTS = $(am_liblldpd_la_OBJECTS)
229 $(am__objects_8) $(am__objects_9)
230 am__objects_10 =
231 nodist_liblldpd_la_OBJECTS = $(am__objects_10)
232 liblldpd_la_OBJECTS = $(am_liblldpd_la_OBJECTS) \
233 $(nodist_liblldpd_la_OBJECTS)
218234 AM_V_lt = $(am__v_lt_@AM_V@)
219235 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
220236 am__v_lt_0 = --silent
222238 liblldpd_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
223239 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(liblldpd_la_CFLAGS) \
224240 $(CFLAGS) $(liblldpd_la_LDFLAGS) $(LDFLAGS) -o $@
225 am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"
241 am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" \
242 "$(DESTDIR)$(systemdsystemunitdir)" "$(DESTDIR)$(tapsetdir)"
226243 PROGRAMS = $(sbin_PROGRAMS)
227244 am_lldpd_OBJECTS = main.$(OBJEXT)
228245 lldpd_OBJECTS = $(am_lldpd_OBJECTS)
229 lldpd_DEPENDENCIES = liblldpd.la
246 lldpd_DEPENDENCIES = liblldpd.la $(am__append_17)
230247 AM_V_P = $(am__v_P_@AM_V@)
231248 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
232249 am__v_P_0 = false
261278 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
262279 am__v_CCLD_0 = @echo " CCLD " $@;
263280 am__v_CCLD_1 =
264 SOURCES = $(liblldpd_la_SOURCES) $(lldpd_SOURCES)
281 SOURCES = $(liblldpd_la_SOURCES) $(nodist_liblldpd_la_SOURCES) \
282 $(lldpd_SOURCES)
265283 DIST_SOURCES = $(am__liblldpd_la_SOURCES_DIST) $(lldpd_SOURCES)
266284 am__can_run_installinfo = \
267285 case $$AM_UPDATE_INFO_DIR in \
298316 man8dir = $(mandir)/man8
299317 NROFF = nroff
300318 MANS = $(dist_man_MANS)
319 DATA = $(systemdsystemunit_DATA) $(tapset_DATA)
301320 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
302321 # Read a list of newline-separated strings from the standard input,
303322 # and print each of them once, without duplicates. Input order is
344363 DLLTOOL = @DLLTOOL@
345364 DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
346365 DSYMUTIL = @DSYMUTIL@
366 DTRACE = @DTRACE@
347367 DUMPBIN = @DUMPBIN@
348368 DX_CONFIG = @DX_CONFIG@
349369 DX_DOCDIR = @DX_DOCDIR@
382402 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
383403 JANSSON_CFLAGS = @JANSSON_CFLAGS@
384404 JANSSON_LIBS = @JANSSON_LIBS@
405 LAUNCHDDAEMONSDIR = @LAUNCHDDAEMONSDIR@
385406 LD = @LD@
386407 LDFLAGS = @LDFLAGS@
387408 LIBEVENT_CFLAGS = @LIBEVENT_CFLAGS@
422443 PRIVSEP_USER = @PRIVSEP_USER@
423444 RANLIB = @RANLIB@
424445 READLINE_LIBS = @READLINE_LIBS@
446 SECCOMP_CFLAGS = @SECCOMP_CFLAGS@
447 SECCOMP_LIBS = @SECCOMP_LIBS@
425448 SED = @SED@
426449 SET_MAKE = @SET_MAKE@
427450 SHELL = @SHELL@
428451 STRIP = @STRIP@
452 SYSTEMDSYSTEMUNITDIR = @SYSTEMDSYSTEMUNITDIR@
429453 VERSION = @VERSION@
430454 XML2_CFLAGS = @XML2_CFLAGS@
431455 XML2_CONFIG = @XML2_CONFIG@
464488 includedir = @includedir@
465489 infodir = @infodir@
466490 install_sh = @install_sh@
491 launchddaemonsdir = @launchddaemonsdir@
467492 libdir = @libdir@
468493 libexecdir = @libexecdir@
469494 localedir = @localedir@
480505 srcdir = @srcdir@
481506 subdirs = @subdirs@
482507 sysconfdir = @sysconfdir@
508 systemdsystemunitdir = @systemdsystemunitdir@
483509 target_alias = @target_alias@
484510 top_build_prefix = @top_build_prefix@
485511 top_builddir = @top_builddir@
486512 top_srcdir = @top_srcdir@
487513 AM_CFLAGS = -I $(top_srcdir)/include
514 BUILT_SOURCES = $(am__append_11) $(am__append_16)
488515 dist_man_MANS = lldpd.8
489516 noinst_LTLIBRARIES = liblldpd.la
517 nodist_liblldpd_la_SOURCES = $(am__append_12)
490518 liblldpd_la_SOURCES = frame.h frame.c lldp.c lldp-tlv.h cdp.c cdp.h \
491519 sonmp.c sonmp.h edp.c edp.h client.c priv.c privsep_io.c \
492 interfaces.c event.c lldpd.c $(am__append_1) $(am__append_2) \
493 $(am__append_3) $(am__append_4) $(am__append_5) \
494 $(am__append_6) $(am__append_7) $(am__append_8)
495 liblldpd_la_CFLAGS = $(AM_CFLAGS) @LIBEVENT_CFLAGS@ $(am__append_9)
520 interfaces.c event.c lldpd.c probes.d trace.h $(am__append_1) \
521 $(am__append_2) $(am__append_3) $(am__append_4) \
522 $(am__append_5) $(am__append_6) $(am__append_7) \
523 $(am__append_8) $(am__append_13)
524 liblldpd_la_CFLAGS = $(AM_CFLAGS) @LIBEVENT_CFLAGS@ $(am__append_9) \
525 $(am__append_14)
496526 liblldpd_la_CPPFLAGS = -DSYSCONFDIR='"$(sysconfdir)"' -DLLDPCLI_PATH='"$(sbindir)/lldpcli"'
497527 liblldpd_la_LIBADD = $(top_builddir)/src/libcommon-daemon-client.la \
498528 $(top_builddir)/src/libcommon-daemon-lib.la @LIBEVENT_LIBS@ \
499 $(am__append_10)
529 $(am__append_10) $(am__append_15)
500530 @HOST_OS_OSX_TRUE@liblldpd_la_LDFLAGS = -framework Foundation \
501531 @HOST_OS_OSX_TRUE@ -framework CoreFoundation -framework IOKit \
502532 @HOST_OS_OSX_TRUE@ -framework IOKit
503533 lldpd_SOURCES = main.c
504 lldpd_LDADD = liblldpd.la @LIBEVENT_LDFLAGS@
505 all: all-am
534 lldpd_LDADD = liblldpd.la @LIBEVENT_LDFLAGS@ $(am__append_17)
535 EXTRA_DIST = dtrace2systemtap.awk
536 @ENABLE_SYSTEMTAP_TRUE@tapsetdir = $(datadir)/systemtap/tapset
537 @ENABLE_SYSTEMTAP_TRUE@tapset_DATA = lldpd.stp
538 @HAVE_SYSTEMDSYSTEMUNITDIR_TRUE@systemdsystemunit_DATA = lldpd.service
539 all: $(BUILT_SOURCES)
540 $(MAKE) $(AM_MAKEFLAGS) all-am
506541
507542 .SUFFIXES:
508543 .SUFFIXES: .c .lo .o .obj
536571 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
537572 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
538573 $(am__aclocal_m4_deps):
574 lldpd.service: $(top_builddir)/config.status $(srcdir)/lldpd.service.in
575 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
539576
540577 clean-noinstLTLIBRARIES:
541578 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
635672 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblldpd_la-netlink.Plo@am__quote@
636673 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblldpd_la-priv-bsd.Plo@am__quote@
637674 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblldpd_la-priv-linux.Plo@am__quote@
675 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblldpd_la-priv-seccomp.Plo@am__quote@
638676 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblldpd_la-priv.Plo@am__quote@
639677 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblldpd_la-privsep_io.Plo@am__quote@
640678 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblldpd_la-sonmp.Plo@am__quote@
645683 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
646684 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
647685 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
648 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
686 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
649687
650688 .c.obj:
651689 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
652690 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
653691 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
654692 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
655 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
693 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
656694
657695 .c.lo:
658696 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
856894 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='agent_priv.c' object='liblldpd_la-agent_priv.lo' libtool=yes @AMDEPBACKSLASH@
857895 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
858896 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblldpd_la_CPPFLAGS) $(CPPFLAGS) $(liblldpd_la_CFLAGS) $(CFLAGS) -c -o liblldpd_la-agent_priv.lo `test -f 'agent_priv.c' || echo '$(srcdir)/'`agent_priv.c
897
898 liblldpd_la-priv-seccomp.lo: priv-seccomp.c
899 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblldpd_la_CPPFLAGS) $(CPPFLAGS) $(liblldpd_la_CFLAGS) $(CFLAGS) -MT liblldpd_la-priv-seccomp.lo -MD -MP -MF $(DEPDIR)/liblldpd_la-priv-seccomp.Tpo -c -o liblldpd_la-priv-seccomp.lo `test -f 'priv-seccomp.c' || echo '$(srcdir)/'`priv-seccomp.c
900 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblldpd_la-priv-seccomp.Tpo $(DEPDIR)/liblldpd_la-priv-seccomp.Plo
901 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='priv-seccomp.c' object='liblldpd_la-priv-seccomp.lo' libtool=yes @AMDEPBACKSLASH@
902 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
903 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblldpd_la_CPPFLAGS) $(CPPFLAGS) $(liblldpd_la_CFLAGS) $(CFLAGS) -c -o liblldpd_la-priv-seccomp.lo `test -f 'priv-seccomp.c' || echo '$(srcdir)/'`priv-seccomp.c
859904
860905 mostlyclean-libtool:
861906 -rm -f *.lo
905950 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
906951 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
907952 dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
953 install-systemdsystemunitDATA: $(systemdsystemunit_DATA)
954 @$(NORMAL_INSTALL)
955 @list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \
956 if test -n "$$list"; then \
957 echo " $(MKDIR_P) '$(DESTDIR)$(systemdsystemunitdir)'"; \
958 $(MKDIR_P) "$(DESTDIR)$(systemdsystemunitdir)" || exit 1; \
959 fi; \
960 for p in $$list; do \
961 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
962 echo "$$d$$p"; \
963 done | $(am__base_list) | \
964 while read files; do \
965 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(systemdsystemunitdir)'"; \
966 $(INSTALL_DATA) $$files "$(DESTDIR)$(systemdsystemunitdir)" || exit $$?; \
967 done
968
969 uninstall-systemdsystemunitDATA:
970 @$(NORMAL_UNINSTALL)
971 @list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \
972 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
973 dir='$(DESTDIR)$(systemdsystemunitdir)'; $(am__uninstall_files_from_dir)
974 install-tapsetDATA: $(tapset_DATA)
975 @$(NORMAL_INSTALL)
976 @list='$(tapset_DATA)'; test -n "$(tapsetdir)" || list=; \
977 if test -n "$$list"; then \
978 echo " $(MKDIR_P) '$(DESTDIR)$(tapsetdir)'"; \
979 $(MKDIR_P) "$(DESTDIR)$(tapsetdir)" || exit 1; \
980 fi; \
981 for p in $$list; do \
982 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
983 echo "$$d$$p"; \
984 done | $(am__base_list) | \
985 while read files; do \
986 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tapsetdir)'"; \
987 $(INSTALL_DATA) $$files "$(DESTDIR)$(tapsetdir)" || exit $$?; \
988 done
989
990 uninstall-tapsetDATA:
991 @$(NORMAL_UNINSTALL)
992 @list='$(tapset_DATA)'; test -n "$(tapsetdir)" || list=; \
993 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
994 dir='$(DESTDIR)$(tapsetdir)'; $(am__uninstall_files_from_dir)
908995
909996 ID: $(am__tagged_files)
910997 $(am__define_uniq_tagged_files); mkid -fID $$unique
9891076 fi; \
9901077 done
9911078 check-am: all-am
992 check: check-am
993 all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS)
1079 check: $(BUILT_SOURCES)
1080 $(MAKE) $(AM_MAKEFLAGS) check-am
1081 all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(DATA)
9941082 installdirs:
995 for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \
1083 for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(systemdsystemunitdir)" "$(DESTDIR)$(tapsetdir)"; do \
9961084 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
9971085 done
998 install: install-am
1086 install: $(BUILT_SOURCES)
1087 $(MAKE) $(AM_MAKEFLAGS) install-am
9991088 install-exec: install-exec-am
10001089 install-data: install-data-am
10011090 uninstall: uninstall-am
10251114 maintainer-clean-generic:
10261115 @echo "This command is intended for maintainers to use"
10271116 @echo "it deletes files that may require special tools to rebuild."
1117 -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
10281118 clean: clean-am
10291119
10301120 clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
10481138
10491139 info-am:
10501140
1051 install-data-am: install-man
1141 install-data-am: install-man install-systemdsystemunitDATA \
1142 install-tapsetDATA
10521143
10531144 install-dvi: install-dvi-am
10541145
10941185
10951186 ps-am:
10961187
1097 uninstall-am: uninstall-man uninstall-sbinPROGRAMS
1188 uninstall-am: uninstall-man uninstall-sbinPROGRAMS \
1189 uninstall-systemdsystemunitDATA uninstall-tapsetDATA
10981190
10991191 uninstall-man: uninstall-man8
11001192
1101 .MAKE: install-am install-strip
1193 .MAKE: all check install install-am install-strip
11021194
11031195 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
11041196 clean-libtool clean-noinstLTLIBRARIES clean-sbinPROGRAMS \
11091201 install-exec install-exec-am install-html install-html-am \
11101202 install-info install-info-am install-man install-man8 \
11111203 install-pdf install-pdf-am install-ps install-ps-am \
1112 install-sbinPROGRAMS install-strip installcheck \
1204 install-sbinPROGRAMS install-strip \
1205 install-systemdsystemunitDATA install-tapsetDATA installcheck \
11131206 installcheck-am installdirs maintainer-clean \
11141207 maintainer-clean-generic mostlyclean mostlyclean-compile \
11151208 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
11161209 tags tags-am uninstall uninstall-am uninstall-man \
1117 uninstall-man8 uninstall-sbinPROGRAMS
1118
1210 uninstall-man8 uninstall-sbinPROGRAMS \
1211 uninstall-systemdsystemunitDATA uninstall-tapsetDATA
1212
1213 @USE_SECCOMP_TRUE@syscall-names.h:
1214 @USE_SECCOMP_TRUE@ echo "static const char *syscall_names[] = {" > $@ ;\
1215 @USE_SECCOMP_TRUE@ echo "#include <sys/syscall.h>" | cpp -dM | grep '^#define __NR_' | \
1216 @USE_SECCOMP_TRUE@ LC_ALL=C sed -r -n -e 's/^\#define[ \t]+__NR_([a-z0-9_]+)[ \t]+([0-9]+)(.*)/ [\2] = "\1",/p' >> $@ ;\
1217 @USE_SECCOMP_TRUE@ echo "};" >> $@
1218 @ENABLE_SYSTEMTAP_TRUE@probes.h: probes.d
1219 @ENABLE_SYSTEMTAP_TRUE@ $(AM_V_GEN)
1220 @ENABLE_SYSTEMTAP_TRUE@ $(AM_V_at)$(DTRACE) -C -h -s $< -o $@
1221 @ENABLE_SYSTEMTAP_TRUE@probes.o: probes.d
1222 @ENABLE_SYSTEMTAP_TRUE@ $(AM_V_GEN)
1223 @ENABLE_SYSTEMTAP_TRUE@ $(AM_V_at)$(DTRACE) -C -G -s $< -o $@
1224
1225 @ENABLE_SYSTEMTAP_TRUE@lldpd.stp: probes.d $(srcdir)/dtrace2systemtap.awk $(top_builddir)/config.status
1226 @ENABLE_SYSTEMTAP_TRUE@ $(AM_V_GEN)$(AWK) -f $(srcdir)/dtrace2systemtap.awk -v sbindir=$(sbindir) $< > $@ || ( rm -f $@ ; exit 1 )
11191227
11201228 @LIBEVENT_EMBEDDED_TRUE@event.c: $(top_builddir)/libevent/libevent.la
11211229 @LIBEVENT_EMBEDDED_TRUE@$(top_builddir)/libevent/libevent.la: $(top_srcdir)/libevent/*.c $(top_srcdir)/libevent/*.h
204204 POKE_RESTORE(pos_checksum);
205205 if (!(POKE_UINT16(ntohs(checksum)))) goto toobig;
206206
207 if (hardware->h_ops->send(global, hardware,
207 if (interfaces_send_helper(global, hardware,
208208 (char *)packet, end - packet) == -1) {
209209 log_warn("cdp", "unable to send packet on real device for %s",
210210 hardware->h_ifname);
1515 */
1616
1717 #include "lldpd.h"
18 #include "trace.h"
1819
1920 static int
2021 client_handle_none(struct lldpd *cfg, enum hmsg_type *type,
115116 config->c_set_ifdescr?"enable":"disable");
116117 cfg->g_config.c_set_ifdescr = config->c_set_ifdescr;
117118 levent_update_now(cfg);
119 }
120 if (config->c_bond_slave_src_mac_type != 0) {
121 if (config->c_bond_slave_src_mac_type >
122 LLDP_BOND_SLAVE_SRC_MAC_TYPE_UNKNOWN &&
123 config->c_bond_slave_src_mac_type <=
124 LLDP_BOND_SLAVE_SRC_MAC_TYPE_MAX) {
125 log_debug("rpc", "change bond src mac type to %d",
126 config->c_bond_slave_src_mac_type);
127 cfg->g_config.c_bond_slave_src_mac_type =
128 config->c_bond_slave_src_mac_type;
129 } else {
130 log_info("rpc", "Invalid bond slave src mac type: %d\n",
131 config->c_bond_slave_src_mac_type);
132 }
118133 }
119134
120135 lldpd_config_cleanup(config);
320335
321336 struct client_handle {
322337 enum hmsg_type type;
338 const char *name;
323339 int (*handle)(struct lldpd*, enum hmsg_type *,
324340 void *, int, void **, int *);
325341 };
326342
327343 static struct client_handle client_handles[] = {
328 { NONE, client_handle_none },
329 { GET_CONFIG, client_handle_get_configuration },
330 { SET_CONFIG, client_handle_set_configuration },
331 { GET_INTERFACES, client_handle_get_interfaces },
332 { GET_INTERFACE, client_handle_get_interface },
333 { SET_PORT, client_handle_set_port },
334 { SUBSCRIBE, client_handle_subscribe },
344 { NONE, "None", client_handle_none },
345 { GET_CONFIG, "Get configuration", client_handle_get_configuration },
346 { SET_CONFIG, "Set configuration", client_handle_set_configuration },
347 { GET_INTERFACES, "Get interfaces", client_handle_get_interfaces },
348 { GET_INTERFACE, "Get interface", client_handle_get_interface },
349 { SET_PORT, "Set port", client_handle_set_port },
350 { SUBSCRIBE, "Subscribe", client_handle_subscribe },
335351 { 0, NULL } };
336352
337353 int
347363 log_debug("rpc", "handle client request");
348364 for (ch = client_handles; ch->handle != NULL; ch++) {
349365 if (ch->type == type) {
366 TRACE(LLDPD_CLIENT_REQUEST(ch->name));
350367 answer = NULL;
351368 len = ch->handle(cfg, &type, buffer, n, &answer,
352369 subscribed);
0 #!/usr/bin/awk -f
1
2 # Convert a simple dtrace probe files into a tapset. Heavily inspired
3 # by dtrace2systemtap.pl from libvirt
4
5 ($1 == "provider") {
6 provider = $2
7 }
8
9 ($1 == "probe") {
10 name = substr($2, 0, index($2, "(") - 1)
11 split(substr($0, index($0, "(") + 1, index($0, ")") - index($0, "(") - 1),
12 args, /, /)
13 printf "probe %s.%s = process(\"%s/%s\").provider(\"%s\").mark(\"%s\") {\n", provider, name, sbindir, provider, provider, name
14 for (arg in args) {
15 match(args[arg], /^(.+[^a-z_])([a-z_]+)$/, aarg)
16 type = aarg[1]
17 argname = aarg[2]
18 if (type == "char *")
19 printf " %s = user_string($arg%d);\n", argname, arg
20 else
21 printf " %s = $arg%d;\n", argname, arg
22 }
23 printf "}\n\n"
24 }
199199 checksum = frame_checksum(pos_edp, v, 0);
200200 if (!(POKE_UINT16(ntohs(checksum)))) goto toobig;
201201
202 if (hardware->h_ops->send(global, hardware,
202 if (interfaces_send_helper(global, hardware,
203203 (char *)packet, end - packet) == -1) {
204204 log_warn("edp", "unable to send packet on real device for %s",
205205 hardware->h_ifname);
1515 */
1616
1717 #include "lldpd.h"
18 #include "trace.h"
1819
1920 #include <unistd.h>
2021 #include <signal.h>
2122 #include <errno.h>
2223 #include <time.h>
24 #include <fcntl.h>
2325 #include <event2/event.h>
2426 #include <event2/bufferevent.h>
2527 #include <event2/buffer.h>
103105 log_warn("event", "unable to allocate memory for new SNMP event");
104106 return;
105107 }
106 evutil_make_socket_nonblocking(fd);
108 levent_make_socket_nonblocking(fd);
107109 if ((snmpfd->ev = event_new(base, fd,
108110 EV_READ | EV_PERSIST,
109111 levent_snmp_read,
357359 goto accept_failed;
358360 }
359361 client->cfg = cfg;
360 evutil_make_socket_nonblocking(s);
362 levent_make_socket_nonblocking(s);
361363 TAILQ_INSERT_TAIL(&lldpd_clients, client, next);
362364 if ((client->bev = bufferevent_socket_new(cfg->g_base, s,
363365 BEV_OPT_CLOSE_ON_FREE)) == NULL) {
457459 /* Setup unix socket */
458460 log_debug("event", "register Unix socket");
459461 TAILQ_INIT(&lldpd_clients);
460 evutil_make_socket_nonblocking(cfg->g_ctl);
462 levent_make_socket_nonblocking(cfg->g_ctl);
461463 if ((cfg->g_ctl_event = event_new(cfg->g_base, cfg->g_ctl,
462464 EV_READ|EV_PERSIST, levent_ctl_accept, cfg)) == NULL)
463465 fatalx("unable to setup control socket event");
483485 {
484486 levent_init(cfg);
485487 lldpd_loop(cfg);
488 #ifdef USE_SNMP
489 if (cfg->g_snmp) levent_snmp_update(cfg);
490 #endif
486491
487492 /* libevent loop */
488493 do {
494 TRACE(LLDPD_EVENT_LOOP());
489495 if (event_base_got_break(cfg->g_base) ||
490496 event_base_got_exit(cfg->g_base))
491497 break;
492 #ifdef USE_SNMP
493 if (cfg->g_snmp) {
494 /* We don't use delegated requests (request
495 whose answer is delayed). However, we keep
496 the call here in case we use it some
497 day. We don't call run_alarms() here. We do
498 it on timeout only. */
499 netsnmp_check_outstanding_agent_requests();
500 levent_snmp_update(cfg);
501 }
502 #endif
503498 } while (event_base_loop(cfg->g_base, EVLOOP_ONCE) == 0);
504499
505500 #ifdef USE_SNMP
546541 hardware->h_ifname);
547542 return;
548543 }
549 evutil_make_socket_nonblocking(fd);
544 levent_make_socket_nonblocking(fd);
550545 if ((hfd->ev = event_new(hardware->h_cfg->g_base, fd,
551546 EV_READ | EV_PERSIST,
552547 levent_hardware_recv,
624619 /* Schedule local port update. We don't run it right away because we may
625620 * receive a batch of events like this. */
626621 struct timeval one_sec = {1, 0};
622 TRACE(LLDPD_INTERFACES_NOTIFICATION());
627623 log_debug("event",
628624 "received notification change, schedule an update of all interfaces in one second");
629625 if (cfg->g_iface_timer_event == NULL) {
646642 {
647643 log_debug("event", "subscribe to interface changes from socket %d",
648644 socket);
649 evutil_make_socket_nonblocking(socket);
645 levent_make_socket_nonblocking(socket);
650646 cfg->g_iface_event = event_new(cfg->g_base, socket,
651647 EV_READ | EV_PERSIST, levent_iface_recv, cfg);
652648 if (cfg->g_iface_event == NULL) {
762758 return;
763759 }
764760 }
761
762 int
763 levent_make_socket_nonblocking(int fd)
764 {
765 int flags;
766 if ((flags = fcntl(fd, F_GETFL, NULL)) < 0) {
767 log_warn("event", "fcntl(%d, F_GETFL)", fd);
768 return -1;
769 }
770 if (flags & O_NONBLOCK) return 0;
771 if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) == -1) {
772 log_warn("event", "fcntl(%d, F_SETFL)", fd);
773 return -1;
774 }
775 return 0;
776 }
228228 struct interfaces_device_list *interfaces,
229229 struct interfaces_device *master)
230230 {
231 /* Shortcut if we detect the new team driver. Upper and lower links
232 * should already be set with netlink in this case. */
233 if (master->driver && !strcmp(master->driver, "team")) {
234 return 1;
235 }
236
231237 struct ifreq ifr = {};
232238 struct ifbond ifb = {};
233239 strlcpy(ifr.ifr_name, master->name, sizeof(ifr.ifr_name));
271277 char path[SYSFS_PATH_MAX];
272278 char line[100];
273279
274 if ((master = iface->upper) == NULL)
280 if ((master = iface->upper) == NULL || master->type != IFACE_BOND_T)
275281 return;
276282
277283 log_debug("interfaces", "get MAC address for %s",
465471 }
466472
467473 static int
468 iface_bond_send(struct lldpd *cfg, struct lldpd_hardware *hardware,
469 char *buffer, size_t size)
470 {
471 /* With bonds, we have duplicate MAC address on different physical
472 * interfaces. We need to alter the source MAC address when we send on
473 * an inactive slave. To avoid any future problem, we always set the
474 * source MAC address to 0. */
475 log_debug("interfaces", "send PDU to bonded device %s",
476 hardware->h_ifname);
477 if (size < 2 * ETHER_ADDR_LEN) {
478 log_warnx("interfaces",
479 "packet to send on %s is too small!",
480 hardware->h_ifname);
481 return 0;
482 }
483 memset(buffer + ETHER_ADDR_LEN, 0, ETHER_ADDR_LEN);
484 return write(hardware->h_sendfd,
485 buffer, size);
486 }
487
488 static int
489474 iface_bond_recv(struct lldpd *cfg, struct lldpd_hardware *hardware,
490475 int fd, char *buffer, size_t size)
491476 {
534519 }
535520
536521 struct lldpd_ops bond_ops = {
537 .send = iface_bond_send,
522 .send = iflinux_eth_send,
538523 .recv = iface_bond_recv,
539524 .cleanup = iface_bond_close,
540525 };
578563 continue;
579564 }
580565 hardware->h_ops = &bond_ops;
581 TAILQ_INSERT_TAIL(&cfg->g_hardware, hardware, h_entries);
566 hardware->h_mangle = 1;
567 interfaces_helper_add_hardware(cfg, hardware);
582568 } else {
583569 if (hardware->h_flags) continue; /* Already seen this time */
584570 bmaster = hardware->h_data;
682668 "interface %s is a bond",
683669 iface->name);
684670 iface->type |= IFACE_BOND_T;
685 iflinux_get_permanent_mac(cfg,
686 interfaces, iface);
687671 }
688672 }
689673 }
764748 continue;
765749 }
766750
751 /* Get the real MAC address (for example, if the interface is enslaved) */
752 iflinux_get_permanent_mac(cfg, interfaces, iface);
753
767754 log_debug("interfaces",
768755 "%s is a physical interface",
769756 iface->name);
1515 */
1616
1717 #include "lldpd.h"
18 #include "trace.h"
1819
1920 #include <stddef.h>
2021 #include <unistd.h>
495496 }
496497
497498 void
499 interfaces_helper_add_hardware(struct lldpd *cfg,
500 struct lldpd_hardware *hardware)
501 {
502 TRACE(LLDPD_INTERFACES_NEW(hardware->h_ifname));
503 TAILQ_INSERT_TAIL(&cfg->g_hardware, hardware, h_entries);
504 }
505
506 void
498507 interfaces_helper_physical(struct lldpd *cfg,
499508 struct interfaces_device_list *interfaces,
500509 struct lldpd_ops *ops,
528537 continue;
529538 }
530539 hardware->h_ops = ops;
531 TAILQ_INSERT_TAIL(&cfg->g_hardware, hardware, h_entries);
540 hardware->h_mangle = (iface->upper &&
541 iface->upper->type & IFACE_BOND_T);
542 interfaces_helper_add_hardware(cfg, hardware);
532543 } else {
533544 if (hardware->h_flags) continue; /* Already seen this time */
534545 lldpd_port_cleanup(&hardware->h_lport, 0);
555566 #endif
556567 }
557568 }
569
570 /**
571 * Send the packet using the hardware function. Optionnaly mangle the MAC address.
572 *
573 * With bonds, we have duplicate MAC address on different physical
574 * interfaces. We need to alter the source MAC address when we send on an
575 * inactive slave. The `h_mangle` flah is used to know if we need to do
576 * something like that.
577 */
578 int
579 interfaces_send_helper(struct lldpd *cfg,
580 struct lldpd_hardware *hardware,
581 char *buffer, size_t size)
582 {
583 if (size < 2 * ETHER_ADDR_LEN) {
584 log_warnx("interfaces",
585 "packet to send on %s is too small!",
586 hardware->h_ifname);
587 return 0;
588 }
589 if (hardware->h_mangle) {
590 #define MAC_UL_ADMINISTERED_BIT_MASK 0x02
591 char *src_mac = buffer + ETHER_ADDR_LEN;
592 char arbitrary[] = { 0x00, 0x60, 0x08, 0x69, 0x97, 0xef};
593
594 switch (cfg->g_config.c_bond_slave_src_mac_type) {
595 case LLDP_BOND_SLAVE_SRC_MAC_TYPE_LOCALLY_ADMINISTERED:
596 if (*src_mac & MAC_UL_ADMINISTERED_BIT_MASK) {
597 /* If locally administered bit already set,
598 * use zero mac
599 */
600 memset(src_mac, 0, ETHER_ADDR_LEN);
601 break;
602 }
603 case LLDP_BOND_SLAVE_SRC_MAC_TYPE_FIXED:
604 memcpy(src_mac, arbitrary, ETHER_ADDR_LEN);
605 break;
606 case LLDP_BOND_SLAVE_SRC_MAC_TYPE_ZERO:
607 memset(src_mac, 0, ETHER_ADDR_LEN);
608 break;
609 }
610 }
611 return hardware->h_ops->send(cfg, hardware, buffer, size);
612 }
423423 POKE_END_LLDP_TLV))
424424 goto toobig;
425425
426 if (hardware->h_ops->send(global, hardware,
426 if (interfaces_send_helper(global, hardware,
427427 (char *)packet, pos - packet) == -1) {
428428 log_warn("lldp", "unable to send packet on real device for %s",
429429 hardware->h_ifname);
1515 */
1616
1717 #include "lldpd.h"
18 #include "trace.h"
1819
1920 #include <stdio.h>
2021 #include <unistd.h>
274275 notify_clients_deletion(struct lldpd_hardware *hardware,
275276 struct lldpd_port *rport)
276277 {
278 TRACE(LLDPD_NEIGHBOR_DELETE(hardware->h_ifname,
279 rport->p_chassis->c_name,
280 rport->p_descr));
277281 levent_ctl_notify(hardware->h_ifname, NEIGHBOR_CHANGE_DELETED,
278282 rport);
279283 #ifdef USE_SNMP
333337 hardware = hardware_next) {
334338 hardware_next = TAILQ_NEXT(hardware, h_entries);
335339 if (!hardware->h_flags) {
340 TRACE(LLDPD_INTERFACES_DELETE(hardware->h_ifname));
336341 TAILQ_REMOVE(&cfg->g_hardware, hardware, h_entries);
337 lldpd_remote_cleanup(hardware, NULL);
342 lldpd_remote_cleanup(hardware, notify_clients_deletion, 1);
338343 lldpd_hardware_cleanup(cfg, hardware);
339344 } else
340 lldpd_remote_cleanup(hardware, notify_clients_deletion);
345 lldpd_remote_cleanup(hardware, notify_clients_deletion, 0);
341346 }
342347
343348 log_debug("localchassis", "cleanup all chassis");
481486 hardware->h_ifname);
482487 return;
483488 }
489 TRACE(LLDPD_FRAME_DECODED(
490 hardware->h_ifname,
491 cfg->g_protocols[i].name,
492 chassis->c_name,
493 port->p_descr));
484494
485495 /* Do we already have the same MSAP somewhere? */
486496 int count = 0;
576586 /* Notify */
577587 log_debug("decode", "send notifications for changes on %s",
578588 hardware->h_ifname);
579 i = oport?NEIGHBOR_CHANGE_UPDATED:NEIGHBOR_CHANGE_ADDED;
580 levent_ctl_notify(hardware->h_ifname, i, port);
589 if (oport) {
590 TRACE(LLDPD_NEIGHBOR_UPDATE(hardware->h_ifname,
591 chassis->c_name,
592 port->p_descr,
593 i));
594 levent_ctl_notify(hardware->h_ifname, NEIGHBOR_CHANGE_UPDATED, port);
581595 #ifdef USE_SNMP
582 agent_notify(hardware, i, port);
583 #endif
596 agent_notify(hardware, NEIGHBOR_CHANGE_UPDATED, port);
597 #endif
598 } else {
599 TRACE(LLDPD_NEIGHBOR_NEW(hardware->h_ifname,
600 chassis->c_name,
601 port->p_descr,
602 i));
603 levent_ctl_notify(hardware->h_ifname, NEIGHBOR_CHANGE_ADDED, port);
604 #ifdef USE_SNMP
605 agent_notify(hardware, NEIGHBOR_CHANGE_ADDED, port);
606 #endif
607 }
584608
585609 #ifdef ENABLE_LLDPMED
586610 if (!oport && port->p_chassis->c_med_type) {
850874 hardware->h_rx_cnt++;
851875 log_debug("receive", "decode received frame on %s",
852876 hardware->h_ifname);
877 TRACE(LLDPD_FRAME_RECEIVED(hardware->h_ifname, buffer, (size_t)n));
853878 lldpd_decode(cfg, buffer, n, hardware);
854879 lldpd_hide_all(cfg); /* Immediatly hide */
855880 lldpd_count_neighbors(cfg);
886911 continue;
887912 if (port->p_protocol ==
888913 cfg->g_protocols[i].mode) {
914 TRACE(LLDPD_FRAME_SEND(hardware->h_ifname,
915 cfg->g_protocols[i].name));
889916 log_debug("send", "send PDU on %s with protocol %s",
890917 hardware->h_ifname,
891918 cfg->g_protocols[i].name);
902929 * available protocol. */
903930 for (i = 0; cfg->g_protocols[i].mode != 0; i++) {
904931 if (!cfg->g_protocols[i].enabled) continue;
932 TRACE(LLDPD_FRAME_SEND(hardware->h_ifname,
933 cfg->g_protocols[i].name));
905934 log_debug("send", "fallback to protocol %s for %s",
906935 cfg->g_protocols[i].name, hardware->h_ifname);
907936 cfg->g_protocols[i].send(cfg,
10241053 TAILQ_FOREACH(hardware, &cfg->g_hardware, h_entries)
10251054 hardware->h_flags = 0;
10261055
1056 TRACE(LLDPD_INTERFACES_UPDATE());
10271057 interfaces_update(cfg);
10281058 lldpd_cleanup(cfg);
10291059 lldpd_reset_timer(cfg);
10601090 hardware = hardware_next) {
10611091 hardware_next = TAILQ_NEXT(hardware, h_entries);
10621092 log_debug("main", "cleanup interface %s", hardware->h_ifname);
1063 lldpd_remote_cleanup(hardware, NULL);
1093 lldpd_remote_cleanup(hardware, NULL, 1);
10641094 lldpd_hardware_cleanup(cfg, hardware);
10651095 }
10661096 }
10711101 * @return PID of running lldpcli or -1 if error.
10721102 */
10731103 static pid_t
1074 lldpd_configure(int debug, const char *path)
1104 lldpd_configure(int debug, const char *path, const char *ctlname)
10751105 {
10761106 pid_t lldpcli = fork();
10771107 int devnull;
10941124
10951125 log_debug("main", "invoke %s %s", path, sdebug);
10961126 if (execl(path, "lldpcli", sdebug,
1127 "-u", ctlname,
10971128 "-c", SYSCONFDIR "/lldpd.conf",
10981129 "-c", SYSCONFDIR "/lldpd.d",
10991130 "resume",
12161247 #endif
12171248
12181249 int
1219 lldpd_main(int argc, char *argv[])
1250 lldpd_main(int argc, char *argv[], char *envp[])
12201251 {
12211252 struct lldpd *cfg;
12221253 struct lldpd_chassis *lchassis;
12511282 gid_t gid;
12521283
12531284 saved_argv = argv;
1285
1286 #if HAVE_SETPROCTITLE_INIT
1287 setproctitle_init(argc, argv, envp);
1288 #endif
12541289
12551290 /*
12561291 * Get and parse command line options
14131448 /* Configuration with lldpcli */
14141449 if (lldpcli) {
14151450 log_debug("main", "invoking lldpcli for configuration");
1416 if (lldpd_configure(debug, lldpcli) == -1)
1451 if (lldpd_configure(debug, lldpcli, ctlname) == -1)
14171452 fatal("main", "unable to spawn lldpcli");
14181453 }
14191454
14271462 if (daemon(0, 0) != 0)
14281463 fatal("main", "failed to detach daemon");
14291464 if ((pid = open(LLDPD_PID_FILE,
1430 O_TRUNC | O_CREAT | O_WRONLY, 0644)) == -1)
1465 O_TRUNC | O_CREAT | O_WRONLY, 0666)) == -1)
14311466 fatal("main", "unable to open pid file " LLDPD_PID_FILE);
14321467 if (asprintf(&spid, "%d\n", getpid()) == -1)
14331468 fatal("main", "unable to create pid file " LLDPD_PID_FILE);
14751510 cfg->g_snmp = snmp;
14761511 cfg->g_snmp_agentx = agentx;
14771512 #endif /* USE_SNMP */
1513 cfg->g_config.c_bond_slave_src_mac_type = \
1514 LLDP_BOND_SLAVE_SRC_MAC_TYPE_FIXED;
14781515
14791516 /* Get ioctl socket */
14801517 log_debug("main", "get an ioctl socket");
131131 void lldpd_recv(struct lldpd *, struct lldpd_hardware *, int);
132132 void lldpd_send(struct lldpd_hardware *);
133133 void lldpd_loop(struct lldpd *);
134 int lldpd_main(int, char **);
134 int lldpd_main(int, char **, char **);
135135 void lldpd_update_localports(struct lldpd *);
136136 void lldpd_cleanup(struct lldpd *);
137137
149149 int levent_iface_subscribe(struct lldpd *, int);
150150 void levent_schedule_pdu(struct lldpd_hardware *);
151151 void levent_schedule_cleanup(struct lldpd *);
152 int levent_make_socket_nonblocking(int);
152153
153154 /* lldp.c */
154155 int lldp_send(PROTO_SEND_SIG);
237238 PRIV_SNMP_SOCKET,
238239 };
239240
241 /* priv-seccomp.c */
242 #ifdef USE_SECCOMP
243 int priv_seccomp_init(int, int);
244 #endif
240245
241246 /* privsep_io.c */
242247 int may_read(void *, size_t);
350355 struct interfaces_device_list *);
351356 void interfaces_helper_chassis(struct lldpd *,
352357 struct interfaces_device_list *);
358 void interfaces_helper_add_hardware(struct lldpd *,
359 struct lldpd_hardware *);
353360 void interfaces_helper_physical(struct lldpd *,
354361 struct interfaces_device_list *,
355362 struct lldpd_ops *,
362369 void interfaces_helper_vlan(struct lldpd *,
363370 struct interfaces_device_list *);
364371 #endif
372 int interfaces_send_helper(struct lldpd *,
373 struct lldpd_hardware *, char *, size_t);
365374
366375 void interfaces_setup_multicast(struct lldpd *, const char *, int);
367376 int interfaces_routing_enabled(struct lldpd *);
0 [Unit]
1 Description=LLDP daemon
2 Documentation=man:lldpd(8)
3 After=network.target
4 RequiresMountsFor=@PRIVSEP_CHROOT@
5
6 [Service]
7 Type=notify
8 NotifyAccess=main
9 EnvironmentFile=-/etc/default/lldpd
10 EnvironmentFile=-/etc/sysconfig/lldpd
11 ExecStart=@prefix@/sbin/lldpd $DAEMON_ARGS $LLDPD_OPTIONS
12 Restart=on-failure
13
14 [Install]
15 WantedBy=multi-user.target
1010 */
1111
1212 int
13 main(int argc, char **argv)
13 main(int argc, char **argv, char **envp)
1414 {
15 return lldpd_main(argc, argv);
15 return lldpd_main(argc, argv, envp);
1616 }
124124 #endif
125125
126126 #ifdef BIOCLOCK
127 /* Lock interface */
127 /* Lock interface, but first make it non blocking since we cannot do
128 * this later */
129 levent_make_socket_nonblocking(*fd);
128130 if (ioctl(*fd, BIOCLOCK, (caddr_t)&enable) < 0) {
129131 rc = errno;
130132 log_info("privsep", "unable to lock BPF interface %s",
1616
1717 #include "lldpd.h"
1818
19 #include <unistd.h>
1920 #include <sys/types.h>
2021 #include <sys/stat.h>
2122 #include <fcntl.h>
0 /* -*- mode: c; c-file-style: "openbsd" -*- */
1 /*
2 * Copyright (c) 2008 Vincent Bernat <bernat@luffy.cx>
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17 #include "lldpd.h"
18 #include <stdlib.h>
19 #include <unistd.h>
20 #include <errno.h>
21 #include <signal.h>
22
23 #include "syscall-names.h"
24 #include <seccomp.h>
25
26 #ifndef SYS_SECCOMP
27 # define SYS_SECCOMP 1
28 #endif
29
30 #if defined(__i386__)
31 # define REG_SYSCALL REG_EAX
32 # define ARCH_NR AUDIT_ARCH_I386
33 #elif defined(__x86_64__)
34 # define REG_SYSCALL REG_RAX
35 # define ARCH_NR AUDIT_ARCH_X86_64
36 #else
37 # error "Platform does not support seccomp filter yet"
38 # define REG_SYSCALL 0
39 # define ARCH_NR 0
40 #endif
41
42 static int monitored = -1;
43 static int trapped = 0;
44 /**
45 * SIGSYS signal handler
46 * @param nr the signal number
47 * @param info siginfo_t pointer
48 * @param void_context handler context
49 *
50 * Simple signal handler for SIGSYS displaying the error, killing the child and
51 * exiting.
52 *
53 */
54 static void
55 priv_seccomp_trap_handler(int signal, siginfo_t *info, void *vctx)
56 {
57 ucontext_t *ctx = (ucontext_t *)(vctx);
58 unsigned int syscall;
59
60 if (trapped)
61 _exit(161); /* Avoid loops */
62
63 /* Get details */
64 if (info->si_code != SYS_SECCOMP)
65 return;
66 if (!ctx)
67 _exit(161);
68 syscall = ctx->uc_mcontext.gregs[REG_SYSCALL];
69 trapped = 1;
70
71 /* Log them. Technically, `log_warnx()` is not signal safe, but we are
72 * unlikely to reenter here. */
73 log_warnx("seccomp", "invalid syscall attempted: %s(%d)",
74 (syscall < sizeof(syscall_names))?syscall_names[syscall]:"unknown",
75 syscall);
76
77 /* Kill children and exit */
78 kill(monitored, SIGTERM);
79 fatalx("invalid syscall not allowed: stop here");
80 _exit(161);
81 }
82
83 /**
84 * Install a TRAP action signal handler
85 *
86 * This function installs the TRAP action signal handler and is based on
87 * examples from Will Drewry and Kees Cook. Returns zero on success, negative
88 * values on failure.
89 *
90 */
91 static int
92 priv_seccomp_trap_install()
93 {
94 struct sigaction signal_handler = {};
95 sigset_t signal_mask;
96
97 sigemptyset(&signal_mask);
98 sigaddset(&signal_mask, SIGSYS);
99
100 signal_handler.sa_sigaction = &priv_seccomp_trap_handler;
101 signal_handler.sa_flags = SA_SIGINFO;
102 if (sigaction(SIGSYS, &signal_handler, NULL) < 0)
103 return -errno;
104 if (sigprocmask(SIG_UNBLOCK, &signal_mask, NULL))
105 return -errno;
106
107 return 0;
108 }
109
110 /**
111 * Initialize seccomp.
112 *
113 * @param remote file descriptor to talk with the unprivileged process
114 * @param monitored monitored child
115 * @return negative on failures or 0 if everything was setup
116 */
117 int
118 priv_seccomp_init(int remote, int child)
119 {
120 int rc = -1;
121 scmp_filter_ctx ctx;
122
123 log_debug("seccomp", "initialize libseccomp filter");
124 monitored = child;
125 if (priv_seccomp_trap_install() < 0) {
126 log_warn("seccomp", "unable to install SIGSYS handler");
127 goto failure_scmp;
128 }
129
130 if ((ctx = seccomp_init(SCMP_ACT_TRAP)) == NULL) {
131 log_warnx("seccomp", "unable to initialize libseccomp subsystem");
132 goto failure_scmp;
133 }
134
135 if ((rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW,
136 SCMP_SYS(read), 1, SCMP_CMP(0, SCMP_CMP_EQ, remote))) < 0 ||
137 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW,
138 SCMP_SYS(write), 1, SCMP_CMP(0, SCMP_CMP_EQ, remote))) < 0) {
139 errno = -rc;
140 log_warn("seccomp", "unable to allow read/write on remote socket");
141 goto failure_scmp;
142 }
143
144 /* We are far more generic from here. */
145 if ((rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(read), 0)) < 0 ||
146 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(write), 0)) < 0 || /* write needed for */
147 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(open), 0)) < 0 ||
148 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(kill), 0)) < 0 ||
149 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(socket), 0)) < 0 ||
150 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(bind), 0)) < 0 ||
151 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(setsockopt), 0)) < 0 ||
152 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(uname), 0)) < 0 ||
153 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(unlink), 0)) < 0 ||
154 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(ioctl), 0)) < 0 ||
155 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(sendmsg), 0)) < 0 ||
156 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(wait4), 0)) < 0 ||
157 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(stat), 0)) < 0 ||
158 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(rt_sigreturn), 0)) < 0 ||
159 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(close), 0)) < 0 ||
160 /* The following are for resolving addresses */
161 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(mmap), 0)) < 0 ||
162 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(munmap), 0)) < 0 ||
163 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(fstat), 0)) < 0 ||
164 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(connect), 0)) < 0 ||
165 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(futex), 0)) < 0 ||
166
167 (rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(exit_group), 0)) < 0) {
168 errno = -rc;
169 log_warn("seccomp", "unable to build seccomp rules");
170 goto failure_scmp;
171 }
172
173 if ((rc = seccomp_load(ctx)) < 0) {
174 errno = -rc;
175 log_warn("seccomp", "unable to load libseccomp filter");
176 goto failure_scmp;
177 }
178
179 failure_scmp:
180 seccomp_release(ctx);
181 return rc;
182 }
2020 * case, error can be non fatal. */
2121
2222 #include "lldpd.h"
23 #include "trace.h"
2324
2425 #include <stdio.h>
2526 #include <unistd.h>
5657 #ifdef HAVE_NETDB_H
5758 # include <netdb.h>
5859 #endif
59 #include <resolv.h>
60 #ifdef HAVE_RESOLV_H
61 # include <resolv.h>
62 #endif
6063
6164 static int monitored = -1; /* Child */
6265
214217 must_read(&name, sizeof(name));
215218 name[sizeof(name) - 1] = '\0';
216219
220 TRACE(LLDPD_PRIV_INTERFACE_INIT(name));
217221 rc = asroot_iface_init_os(ifindex, name, &fd);
218222 must_write(&rc, sizeof(rc));
219223 if (rc == 0 && fd >=0) send_fd(fd);
273277
274278 must_read(description, len);
275279 description[len] = 0;
280 TRACE(LLDPD_PRIV_INTERFACE_DESCRIPTION(name, description));
276281 rc = asroot_iface_description_os(name, description);
277282 must_write(&rc, sizeof(rc));
278283 }
336341
337342 /* Main loop, run as root */
338343 static void
339 priv_loop()
344 priv_loop(int remote)
340345 {
341346 enum priv_cmd cmd;
342347 struct dispatch_actions *a;
343348
344349 setproctitle("monitor");
350 #ifdef USE_SECCOMP
351 if (priv_seccomp_init(remote, monitored) != 0)
352 fatal("privsep", "cannot continue without seccomp setup");
353 #endif
345354 while (!may_read(&cmd, sizeof(enum priv_cmd))) {
346355 for (a = actions; a->function != NULL; a++) {
347356 if (cmd == a->msg) {
425434 }
426435
427436 /* Initialization */
437 #define LOCALTIME "/etc/localtime"
438 static void
439 priv_setup_chroot(const char *chrootdir)
440 {
441 /* Create chroot if it does not exist */
442 struct stat schroot;
443 if (stat(chrootdir, &schroot) == -1) {
444 if (errno != ENOENT)
445 fatal("privsep", "chroot directory does not exist");
446 if (mkdir(chrootdir, 0755) == -1)
447 fatal("privsep", "unable to create chroot directory");
448 log_info("privsep", "created chroot directory %s",
449 chrootdir);
450 }
451
452 /* Check if /etc/localtime exists in chroot or outside chroot */
453 char path[1024];
454 if (snprintf(path, sizeof(path),
455 "%s" LOCALTIME, chrootdir) >= sizeof(path))
456 return;
457 if (stat(path, &schroot) != -1 ||
458 stat(LOCALTIME, &schroot) == -1) return;
459
460 /* Prepare copy of /etc/localtime */
461 path[strlen(chrootdir) + 4] = '\0';
462 if (stat(path, &schroot) == -1) {
463 if (errno != ENOENT) return;
464 if (mkdir(path, 0755) == -1) {
465 log_warn("privsep", "unable to create %s directory",
466 path);
467 return;
468 }
469 }
470 path[strlen(chrootdir) + 4] = '/';
471
472 /* Do copy */
473 int source = -1, destination = -1;
474 char buffer[1024];
475 ssize_t n;
476 if ((source = open(LOCALTIME, O_RDONLY)) == -1) {
477 log_warn("privsep", "cannot read " LOCALTIME);
478 return;
479 }
480 mode_t old = umask(S_IWGRP | S_IWOTH);
481 if ((destination = open(path,
482 O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) {
483 log_warn("privsep", "cannot create %s", path);
484 close(source);
485 umask(old);
486 return;
487 }
488 umask(old);
489 while ((n = read(source, buffer, sizeof(buffer))) > 0) {
490 ssize_t nw, left = n;
491 char *p = buffer;
492 while (left > 0) {
493 if ((nw = write(destination, p, left)) == -1) {
494 if (errno == EINTR) continue;
495 log_warn("privsep", "cannot write to %s", path);
496 close(source);
497 close(destination);
498 unlink(path);
499 return;
500 }
501 left -= nw;
502 p += nw;
503 }
504 }
505 if (n == -1) {
506 log_warn("privsep", "cannot read " LOCALTIME);
507 unlink(path);
508 } else {
509 log_info("privsep", LOCALTIME " copied to chroot");
510 }
511 close(source);
512 close(destination);
513 }
514
428515 void
429516 priv_init(const char *chrootdir, int ctl, uid_t uid, gid_t gid)
430517 {
446533 if (RUNNING_ON_VALGRIND)
447534 log_warnx("privsep", "running on valgrind, keep privileges");
448535 else {
449 struct stat schroot;
450 if (stat(chrootdir, &schroot) == -1) {
451 if (errno != ENOENT)
452 fatal("privsep", "chroot directory does not exist");
453 if (mkdir(chrootdir, 0755) == -1)
454 fatal("privsep", "unable to create chroot directory");
455 log_info("privsep", "created chroot directory %s",
456 chrootdir);
457 }
536 priv_setup_chroot(chrootdir);
458537 if (chroot(chrootdir) == -1)
459538 fatal("privsep", "unable to chroot");
460539 if (chdir("/") != 0)
489568 if (atexit(priv_exit) != 0)
490569 fatal("privsep", "unable to set exit function");
491570
492 signal(SIGALRM, sig_pass_to_chld);
493 signal(SIGTERM, sig_pass_to_chld);
494 signal(SIGHUP, sig_pass_to_chld);
495 signal(SIGINT, sig_pass_to_chld);
496 signal(SIGQUIT, sig_pass_to_chld);
497 signal(SIGCHLD, sig_chld);
571 /* Install signal handlers */
572 const struct sigaction pass_to_child = {
573 .sa_handler = sig_pass_to_chld,
574 .sa_flags = SA_RESTART
575 };
576 sigaction(SIGALRM, &pass_to_child, NULL);
577 sigaction(SIGTERM, &pass_to_child, NULL);
578 sigaction(SIGHUP, &pass_to_child, NULL);
579 sigaction(SIGINT, &pass_to_child, NULL);
580 sigaction(SIGQUIT, &pass_to_child, NULL);
581 const struct sigaction child = {
582 .sa_handler = sig_chld,
583 .sa_flags = SA_RESTART
584 };
585 sigaction(SIGCHLD, &child, NULL);
586
498587 if (waitpid(monitored, &status, WNOHANG) != 0)
499588 /* Child is already dead */
500589 _exit(1);
501 priv_loop();
590 priv_loop(pair[1]);
502591 exit(0);
503592 }
504593 }
0 /* -*- mode: c; c-file-style: "openbsd" -*- */
1 /*
2 * Copyright (c) 2013 Vincent Bernat <bernat@luffy.cx>
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16 provider lldpd {
17
18 /**
19 * Fired when a frame is received, before it is decoded.
20 * @param ifname the name of the interface
21 * @param frame the received frame
22 * @param len the len of the received frame
23 */
24 probe frame_received(char *ifname, void *frame, size_t len);
25
26 /**
27 * Fired when a frame is decoded.
28 * @param ifname the name of the interface
29 * @param protocol the name of the protocol
30 * @param chassis_name the name of chassis (may be NULL)
31 * @param port_descr the description of the port (may be NULL)
32 */
33 probe frame_decoded(char *ifname, char *protocol, char *chassis_name, char *port_descr);
34
35 /**
36 * Fired when a frame is sent.
37 * @param ifname the name of the interface
38 * @param protocol the name of the protocol
39 */
40 probe frame_send(char *ifname, char *protocol);
41
42 /**
43 * Fired when a neighbor is added.
44 * @param ifname the name of the interface where the neighbor appeared
45 * @param chassis_name the name of chassis (may be NULL)
46 * @param port_descr the description of the port (may be NULL)
47 * @param count the total number of neighbors known
48 */
49 probe neighbor_new(char *ifname, char *chassis_name, char *port_descr, int count);
50
51 /**
52 * Fired when a neighbor is updated.
53 * @param ifname the name of the interface where the neighbor updated
54 * @param chassis_name the name of chassis (may be NULL)
55 * @param port_descr the description of the port (may be NULL)
56 * @param count the total number of neighbors known
57 */
58 probe neighbor_update(char *ifname, char *chassis_name, char *port_descr, int count);
59
60 /**
61 * Fired when a neighbor is deleted.
62 * @param ifname the name of the interface where the neighbor deleted
63 * @param chassis_name the name of chassis (may be NULL)
64 * @param port_descr the description of the port (may be NULL)
65 * @param count the total number of neighbors known
66 */
67 probe neighbor_delete(char *ifname, char *chassis_name, char *port_descr);
68
69 /**
70 * Fired before handling a client request.
71 * @param name the name of the request
72 */
73 probe client_request(char *name);
74
75 /**
76 * Fired for each iteration of the event loop.
77 */
78 probe event_loop();
79
80 /**
81 * Fired when initializing a new interface in privileged mode.
82 * @param name the name of the interface
83 */
84 probe priv_interface_init(char *name);
85
86 /**
87 * Fired when setting description of an interface.
88 * @param name the name of the interface
89 * @param desc the description of the interface
90 */
91 probe priv_interface_description(char *name, char *description);
92
93 /**
94 * Fired when doing an interface updates.
95 */
96 probe interfaces_update();
97
98 /**
99 * Fired when receiving an interface update notification.
100 */
101 probe interfaces_notification();
102
103 /**
104 * Fired when an interface is removed.
105 * @param name the name of the interface
106 */
107 probe interfaces_delete(char *name);
108
109 /**
110 * Fired when an interface is added.
111 * @param name the name of the interface
112 */
113 probe interfaces_new(char *name);
114 };
248248 POKE_SAVE(end)))
249249 goto toobig;
250250
251 if (hardware->h_ops->send(global, hardware,
251 if (interfaces_send_helper(global, hardware,
252252 (char *)packet, end - packet) == -1) {
253253 log_warn("sonmp", "unable to send packet on real device for %s",
254254 hardware->h_ifname);
262262 PEEK_DISCARD(ETHER_ADDR_LEN - 1); /* Modify the last byte of the MAC address */
263263 (void)POKE_UINT8(1);
264264
265 if (hardware->h_ops->send(global, hardware,
265 if (interfaces_send_helper(global, hardware,
266266 (char *)packet, end - packet) == -1) {
267267 log_warn("sonmp", "unable to send second SONMP packet on real device for %s",
268268 hardware->h_ifname);
0 #ifdef ENABLE_DTRACE
1 # include "probes.h"
2 # define TRACE(probe) probe
3 # define TRACE_ENABLED(probe) probe ## _ENABLED()
4 #else
5 # define TRACE(probe)
6 # define TRACE_ENABLED(probe) (0)
7 #endif
22 lib_LTLIBRARIES = liblldpctl.la
33 include_HEADERS = lldpctl.h
44
5 noinst_LTLIBRARIES = libfixedpoint.la
6 libfixedpoint_la_SOURCES = fixedpoint.h fixedpoint.c
7
58 liblldpctl_la_SOURCES = lldpctl.h private.h errors.c connection.c atom.c atom-private.c
6 liblldpctl_la_LIBADD = $(top_builddir)/src/libcommon-daemon-lib.la
7 liblldpctl_la_LDFLAGS = -export-symbols-regex '^lldpctl_' -version-info 5:0:1
9 liblldpctl_la_LIBADD = $(top_builddir)/src/libcommon-daemon-lib.la libfixedpoint.la
10 liblldpctl_la_LDFLAGS = -export-symbols-regex '^lldpctl_' -version-info 6:0:2
811
912 # -version-info format is `current`:`revision`:`age`. For more details, see:
1013 # http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91
0 # Makefile.in generated by automake 1.13.3 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
33 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
9393 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
9494 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
9595 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/os.m4 \
96 $(top_srcdir)/m4/progname.m4 $(top_srcdir)/m4/snmp.m4 \
97 $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/xml2.m4 \
96 $(top_srcdir)/m4/progname.m4 $(top_srcdir)/m4/seccomp.m4 \
97 $(top_srcdir)/m4/snmp.m4 $(top_srcdir)/m4/stdint.m4 \
98 $(top_srcdir)/m4/systemtap.m4 $(top_srcdir)/m4/xml2.m4 \
9899 $(top_srcdir)/configure.ac
99100 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
100101 $(ACLOCAL_M4)
131132 }
132133 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \
133134 "$(DESTDIR)$(includedir)"
134 LTLIBRARIES = $(lib_LTLIBRARIES)
135 liblldpctl_la_DEPENDENCIES = \
136 $(top_builddir)/src/libcommon-daemon-lib.la
137 am_liblldpctl_la_OBJECTS = errors.lo connection.lo atom.lo \
138 atom-private.lo
139 liblldpctl_la_OBJECTS = $(am_liblldpctl_la_OBJECTS)
135 LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
136 libfixedpoint_la_LIBADD =
137 am_libfixedpoint_la_OBJECTS = fixedpoint.lo
138 libfixedpoint_la_OBJECTS = $(am_libfixedpoint_la_OBJECTS)
140139 AM_V_lt = $(am__v_lt_@AM_V@)
141140 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
142141 am__v_lt_0 = --silent
143142 am__v_lt_1 =
143 liblldpctl_la_DEPENDENCIES = \
144 $(top_builddir)/src/libcommon-daemon-lib.la libfixedpoint.la
145 am_liblldpctl_la_OBJECTS = errors.lo connection.lo atom.lo \
146 atom-private.lo
147 liblldpctl_la_OBJECTS = $(am_liblldpctl_la_OBJECTS)
144148 liblldpctl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
145149 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
146150 $(liblldpctl_la_LDFLAGS) $(LDFLAGS) -o $@
178182 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
179183 am__v_CCLD_0 = @echo " CCLD " $@;
180184 am__v_CCLD_1 =
181 SOURCES = $(liblldpctl_la_SOURCES)
182 DIST_SOURCES = $(liblldpctl_la_SOURCES)
185 SOURCES = $(libfixedpoint_la_SOURCES) $(liblldpctl_la_SOURCES)
186 DIST_SOURCES = $(libfixedpoint_la_SOURCES) $(liblldpctl_la_SOURCES)
183187 am__can_run_installinfo = \
184188 case $$AM_UPDATE_INFO_DIR in \
185189 n|no|NO) false;; \
233237 DLLTOOL = @DLLTOOL@
234238 DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
235239 DSYMUTIL = @DSYMUTIL@
240 DTRACE = @DTRACE@
236241 DUMPBIN = @DUMPBIN@
237242 DX_CONFIG = @DX_CONFIG@
238243 DX_DOCDIR = @DX_DOCDIR@
271276 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
272277 JANSSON_CFLAGS = @JANSSON_CFLAGS@
273278 JANSSON_LIBS = @JANSSON_LIBS@
279 LAUNCHDDAEMONSDIR = @LAUNCHDDAEMONSDIR@
274280 LD = @LD@
275281 LDFLAGS = @LDFLAGS@
276282 LIBEVENT_CFLAGS = @LIBEVENT_CFLAGS@
311317 PRIVSEP_USER = @PRIVSEP_USER@
312318 RANLIB = @RANLIB@
313319 READLINE_LIBS = @READLINE_LIBS@
320 SECCOMP_CFLAGS = @SECCOMP_CFLAGS@
321 SECCOMP_LIBS = @SECCOMP_LIBS@
314322 SED = @SED@
315323 SET_MAKE = @SET_MAKE@
316324 SHELL = @SHELL@
317325 STRIP = @STRIP@
326 SYSTEMDSYSTEMUNITDIR = @SYSTEMDSYSTEMUNITDIR@
318327 VERSION = @VERSION@
319328 XML2_CFLAGS = @XML2_CFLAGS@
320329 XML2_CONFIG = @XML2_CONFIG@
353362 includedir = @includedir@
354363 infodir = @infodir@
355364 install_sh = @install_sh@
365 launchddaemonsdir = @launchddaemonsdir@
356366 libdir = @libdir@
357367 libexecdir = @libexecdir@
358368 localedir = @localedir@
369379 srcdir = @srcdir@
370380 subdirs = @subdirs@
371381 sysconfdir = @sysconfdir@
382 systemdsystemunitdir = @systemdsystemunitdir@
372383 target_alias = @target_alias@
373384 top_build_prefix = @top_build_prefix@
374385 top_builddir = @top_builddir@
376387 AM_CFLAGS = -I $(top_srcdir)/include
377388 lib_LTLIBRARIES = liblldpctl.la
378389 include_HEADERS = lldpctl.h
390 noinst_LTLIBRARIES = libfixedpoint.la
391 libfixedpoint_la_SOURCES = fixedpoint.h fixedpoint.c
379392 liblldpctl_la_SOURCES = lldpctl.h private.h errors.c connection.c atom.c atom-private.c
380 liblldpctl_la_LIBADD = $(top_builddir)/src/libcommon-daemon-lib.la
381 liblldpctl_la_LDFLAGS = -export-symbols-regex '^lldpctl_' -version-info 5:0:1
393 liblldpctl_la_LIBADD = $(top_builddir)/src/libcommon-daemon-lib.la libfixedpoint.la
394 liblldpctl_la_LDFLAGS = -export-symbols-regex '^lldpctl_' -version-info 6:0:2
382395
383396 # -version-info format is `current`:`revision`:`age`. For more details, see:
384397 # http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91
456469 rm -f $${locs}; \
457470 }
458471
472 clean-noinstLTLIBRARIES:
473 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
474 @list='$(noinst_LTLIBRARIES)'; \
475 locs=`for p in $$list; do echo $$p; done | \
476 sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
477 sort -u`; \
478 test -z "$$locs" || { \
479 echo rm -f $${locs}; \
480 rm -f $${locs}; \
481 }
482
483 libfixedpoint.la: $(libfixedpoint_la_OBJECTS) $(libfixedpoint_la_DEPENDENCIES) $(EXTRA_libfixedpoint_la_DEPENDENCIES)
484 $(AM_V_CCLD)$(LINK) $(libfixedpoint_la_OBJECTS) $(libfixedpoint_la_LIBADD) $(LIBS)
485
459486 liblldpctl.la: $(liblldpctl_la_OBJECTS) $(liblldpctl_la_DEPENDENCIES) $(EXTRA_liblldpctl_la_DEPENDENCIES)
460487 $(AM_V_CCLD)$(liblldpctl_la_LINK) -rpath $(libdir) $(liblldpctl_la_OBJECTS) $(liblldpctl_la_LIBADD) $(LIBS)
461488
469496 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom.Plo@am__quote@
470497 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection.Plo@am__quote@
471498 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/errors.Plo@am__quote@
499 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fixedpoint.Plo@am__quote@
472500
473501 .c.o:
474502 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
475503 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
476504 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
477505 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
478 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
506 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
479507
480508 .c.obj:
481509 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
482510 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
483511 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
484512 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
485 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
513 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
486514
487515 .c.lo:
488516 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
661689 clean: clean-am
662690
663691 clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
664 mostlyclean-am
692 clean-noinstLTLIBRARIES mostlyclean-am
665693
666694 distclean: distclean-am
667695 -rm -rf ./$(DEPDIR)
733761 .MAKE: install-am install-strip
734762
735763 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
736 clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
737 ctags-am distclean distclean-compile distclean-generic \
738 distclean-libtool distclean-tags distdir dvi dvi-am html \
739 html-am info info-am install install-am install-data \
740 install-data-am install-dvi install-dvi-am install-exec \
741 install-exec-am install-html install-html-am \
764 clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
765 cscopelist-am ctags ctags-am distclean distclean-compile \
766 distclean-generic distclean-libtool distclean-tags distdir dvi \
767 dvi-am html html-am info info-am install install-am \
768 install-data install-data-am install-dvi install-dvi-am \
769 install-exec install-exec-am install-html install-html-am \
742770 install-includeHEADERS install-info install-info-am \
743771 install-libLTLIBRARIES install-man install-pdf install-pdf-am \
744772 install-pkgconfigDATA install-ps install-ps-am install-strip \
2323 #include "../lldpd-structs.h"
2424 #include "../log.h"
2525 #include "private.h"
26
27 #define ntohll(x) \
28 (((u_int64_t)(ntohl((int)(((x) << 32) >> 32))) << 32) | \
29 (unsigned int)ntohl(((int)((x) >> 32))))
26 #include "fixedpoint.h"
3027
3128 /* Translation from constants to string */
3229 static lldpctl_map_t lldpd_protocol_map[] = {
262259 static lldpctl_map_t *port_med_pow_priority_map = port_dot3_power_priority_map;
263260 #endif
264261
262 static lldpctl_map_t bond_slave_src_mac_map[] = {
263 { LLDP_BOND_SLAVE_SRC_MAC_TYPE_REAL, "real"},
264 { LLDP_BOND_SLAVE_SRC_MAC_TYPE_ZERO, "zero"},
265 { LLDP_BOND_SLAVE_SRC_MAC_TYPE_FIXED, "fixed"},
266 { LLDP_BOND_SLAVE_SRC_MAC_TYPE_LOCALLY_ADMINISTERED, "local" },
267 { LLDP_BOND_SLAVE_SRC_MAC_TYPE_UNKNOWN, NULL},
268 };
269
265270 static const char*
266271 map_lookup(lldpctl_map_t *list, int n)
267272 {
318323 case lldpctl_k_dot3_power_priority:
319324 return port_dot3_power_priority_map;
320325 #endif
326 case lldpctl_k_config_bond_slave_src_mac_type:
327 return bond_slave_src_mac_map;
321328 default: return empty_map;
322329 }
323330 }
359366 res = c->config->c_description; break;
360367 case lldpctl_k_config_platform:
361368 res = c->config->c_platform; break;
369 case lldpctl_k_config_bond_slave_src_mac_type:
370 return map_lookup(bond_slave_src_mac_map,
371 c->config->c_bond_slave_src_mac_type);
362372 default:
363373 SET_ERROR(atom->conn, LLDPCTL_ERR_NOT_EXIST);
364374 return NULL;
486496 config.c_tx_hold = value;
487497 if (value > 0) c->config->c_tx_hold = value;
488498 break;
499 case lldpctl_k_config_bond_slave_src_mac_type:
500 config.c_bond_slave_src_mac_type = value;
501 c->config->c_bond_slave_src_mac_type = value;
502 break;
489503 default:
490504 SET_ERROR(atom->conn, LLDPCTL_ERR_NOT_EXIST);
491505 return NULL;
678692 add_chassis(&chassis_list, one_port->p_chassis);
679693
680694 /* Free hardware port */
681 lldpd_remote_cleanup(hardware, NULL);
695 lldpd_remote_cleanup(hardware, NULL, 1);
682696 lldpd_port_cleanup(port->port, 1);
683697 free(port->hardware);
684698
18761890 case 0:
18771891 case LLDP_MED_LOCATION_ALTITUDE_UNIT_METER:
18781892 case LLDP_MED_LOCATION_ALTITUDE_UNIT_FLOOR:
1879 mloc->location->data[10] = value << 4;
1893 mloc->location->data[10] &= 0x0f;
1894 mloc->location->data[10] |= value << 4;
18801895 return atom;
18811896 default: goto bad;
18821897 }
18931908 }
18941909
18951910 static const char*
1896 fixed_precision(lldpctl_atom_t *atom,
1897 u_int64_t value, int intpart, int floatpart, int displaysign,
1898 const char *negsuffix, const char *possuffix)
1899 {
1900 char *buf;
1901 u_int64_t tmp = value;
1902 int negative = 0, n;
1903 u_int32_t integer = 0;
1904 if (value & (1ULL << (intpart + floatpart - 1))) {
1905 negative = 1;
1906 tmp = ~value;
1907 tmp += 1;
1908 }
1909 integer = (u_int32_t)((tmp &
1910 (((1ULL << intpart)-1) << floatpart)) >> floatpart);
1911 tmp = (tmp & ((1<< floatpart) - 1))*10000/(1ULL << floatpart);
1912
1913 if ((buf = _lldpctl_alloc_in_atom(atom, 64)) == NULL)
1914 return NULL;
1915 n = snprintf(buf, 64, "%s%u.%04llu%s",
1916 displaysign?(negative?"-":"+"):"",
1917 integer, (unsigned long long int)tmp,
1918 (negative && negsuffix)?negsuffix:
1919 (!negative && possuffix)?possuffix:"");
1920 if (n > -1 && n < 64)
1921 return buf;
1922 SET_ERROR(atom->conn, LLDPCTL_ERR_NOMEM);
1923 return NULL;
1911 read_fixed_precision(lldpctl_atom_t *atom,
1912 char *buffer, unsigned shift,
1913 unsigned intbits, unsigned fltbits, const char *suffix)
1914 {
1915 struct fp_number fp = fp_buftofp((unsigned char*)buffer, intbits, fltbits, shift);
1916 char *result = fp_fptostr(fp, suffix);
1917 if (result == NULL) {
1918 SET_ERROR(atom->conn, LLDPCTL_ERR_NOMEM);
1919 return NULL;
1920 }
1921
1922 char *stored = _lldpctl_alloc_in_atom(atom, strlen(result) + 1);
1923 if (stored == NULL) {
1924 free(result);
1925 return NULL;
1926 }
1927 strlcpy(stored, result, strlen(result) + 1);
1928 return stored;
19241929 }
19251930
19261931 static const char*
19291934 struct _lldpctl_atom_med_location_t *m =
19301935 (struct _lldpctl_atom_med_location_t *)atom;
19311936 char *value;
1932 u_int64_t l;
19331937
19341938 /* Local and remote port */
19351939 switch (key) {
19411945 m->location->data[15]);
19421946 case lldpctl_k_med_location_latitude:
19431947 if (m->location->format != LLDP_MED_LOCFORMAT_COORD) break;
1944 memcpy(&l, m->location->data, sizeof(u_int64_t));
1945 l = (ntohll(l) & 0x03FFFFFFFF000000ULL) >> 24;
1946 return fixed_precision(atom, l, 9, 25, 0, " S", " N");
1948 return read_fixed_precision(atom, m->location->data,
1949 0, 9, 25, "NS");
19471950 case lldpctl_k_med_location_longitude:
19481951 if (m->location->format != LLDP_MED_LOCFORMAT_COORD) break;
1949 memcpy(&l, m->location->data + 5, sizeof(u_int64_t));
1950 l = (ntohll(l) & 0x03FFFFFFFF000000ULL) >> 24;
1951 return fixed_precision(atom, l, 9, 25, 0, " W", " E");
1952 return read_fixed_precision(atom, m->location->data,
1953 40, 9, 25, "EW");
19521954 case lldpctl_k_med_location_altitude:
19531955 if (m->location->format != LLDP_MED_LOCFORMAT_COORD) break;
1954 l = 0;
1955 memcpy(&l, m->location->data + 10, 5);
1956 l = (ntohll(l) & 0x3FFFFFFF000000ULL) >> 24;
1957 return fixed_precision(atom, l, 22, 8, 1, NULL, NULL);
1956 return read_fixed_precision(atom, m->location->data,
1957 84, 22, 8, NULL);
19581958 case lldpctl_k_med_location_altitude_unit:
19591959 if (m->location->format != LLDP_MED_LOCFORMAT_COORD) break;
19601960 switch (m->location->data[10] & 0xf0) {
19851985 return NULL;
19861986 }
19871987
1988 static void
1989 write_fixed_precision(uint8_t *where, double l,
1990 int precisionnb, int intnb, int floatnb)
1991 {
1992 int intpart, floatpart, precision = 6;
1993 if (l > 0) {
1994 intpart = (int)l;
1995 floatpart = (l - intpart) * (1 << floatnb);
1996 } else {
1997 intpart = -(int)l;
1998 floatpart = (-(l + intpart)) * (1 << floatnb);
1999 intpart = ~intpart; intpart += 1;
2000 floatpart = ~floatpart; floatpart += 1;
2001 }
2002 if ((1 << precisionnb) - 1 < precision)
2003 precision = (1 << precisionnb) - 1;
2004 /* We need to write precision, int part and float part. */
2005 do {
2006 int obit, i, o;
2007 unsigned int ints[3] = { precision, intpart, floatpart };
2008 unsigned int bits[3] = { precisionnb, intnb, floatnb };
2009 for (i = 0, obit = 8, o = 0; i < 3;) {
2010 if (obit > bits[i]) {
2011 where[o] = where[o] |
2012 ((ints[i] & ((1 << bits[i]) - 1)) << (obit - bits[i]));
2013 obit -= bits[i];
2014 i++;
2015 } else {
2016 where[o] = where[o] |
2017 ((ints[i] >> (bits[i] - obit)) & ((1 << obit) - 1));
2018 bits[i] -= obit;
2019 obit = 8;
2020 o++;
2021 }
2022 }
2023 } while(0);
2024 }
2025
20261988 static lldpctl_atom_t*
20271989 _lldpctl_atom_set_str_med_location(lldpctl_atom_t *atom, lldpctl_key_t key,
20281990 const char *value)
20291991 {
20301992 struct _lldpctl_atom_med_location_t *mloc =
20311993 (struct _lldpctl_atom_med_location_t *)atom;
2032 double l;
1994 struct fp_number fp;
20331995 char *end;
20341996
20351997 /* Only local port can be modified */
20422004 case lldpctl_k_med_location_latitude:
20432005 if (mloc->location->format != LLDP_MED_LOCFORMAT_COORD) goto bad;
20442006 if (mloc->location->data == NULL || mloc->location->data_len != 16) goto bad;
2045 l = strtod(value, &end);
2007 fp = fp_strtofp(value, &end, 9, 25);
20462008 if (!end) goto bad;
20472009 if (end && *end != '\0') {
20482010 if (*(end+1) != '\0') goto bad;
2049 if (*end == 'S') l = -l;
2011 if (*end == 'S') fp = fp_negate(fp);
20502012 else if (*end != 'N') goto bad;
20512013 }
2052 write_fixed_precision((uint8_t*)mloc->location->data, l, 6, 9, 25);
2014 fp_fptobuf(fp, (unsigned char*)mloc->location->data, 0);
20532015 return atom;
20542016 case lldpctl_k_med_location_longitude:
20552017 if (mloc->location->format != LLDP_MED_LOCFORMAT_COORD) goto bad;
20562018 if (mloc->location->data == NULL || mloc->location->data_len != 16) goto bad;
2057 l = strtod(value, &end);
2019 fp = fp_strtofp(value, &end, 9, 25);
20582020 if (!end) goto bad;
20592021 if (end && *end != '\0') {
20602022 if (*(end+1) != '\0') goto bad;
2061 if (*end == 'W') l = -l;
2023 if (*end == 'W') fp = fp_negate(fp);
20622024 else if (*end != 'E') goto bad;
20632025 }
2064 write_fixed_precision((uint8_t*)mloc->location->data + 5, l, 6, 9, 25);
2026 fp_fptobuf(fp, (unsigned char*)mloc->location->data, 40);
20652027 return atom;
20662028 case lldpctl_k_med_location_altitude:
20672029 if (mloc->location->format != LLDP_MED_LOCFORMAT_COORD) goto bad;
20682030 if (mloc->location->data == NULL || mloc->location->data_len != 16) goto bad;
2069 l = strtod(value, &end);
2031 fp = fp_strtofp(value, &end, 22, 8);
20702032 if (!end || *end != '\0') goto bad;
2071 write_fixed_precision((uint8_t*)mloc->location->data + 11, l, 2, 22, 8);
2033 fp_fptobuf(fp, (unsigned char*)mloc->location->data, 84);
20722034 return atom;
20732035 case lldpctl_k_med_location_altitude_unit:
20742036 if (mloc->location->format != LLDP_MED_LOCFORMAT_COORD) goto bad;
368368 int
369369 lldpctl_watch(lldpctl_conn_t *conn)
370370 {
371 int rc;
372 size_t much;
371 int rc = 0;
373372
374373 RESET_ERROR(conn);
375374
377376 return SET_ERROR(conn, LLDPCTL_ERR_INVALID_STATE);
378377
379378 conn->watch_triggered = 0;
380 much = 512;
381379 while (!conn->watch_triggered) {
382 rc = _lldpctl_needs(conn, much);
383 much += 512;
380 rc = _lldpctl_needs(conn, 1);
384381 if (rc < 0)
385382 return SET_ERROR(conn, rc);
386383 }
6060 return nb;
6161 }
6262
63 /* Statiscally receive data from remote end. */
63 /* Statically receive data from remote end. */
6464 static ssize_t
6565 sync_recv(lldpctl_conn_t *lldpctl,
6666 const uint8_t *data, size_t length, void *user_data)
0 /* -*- mode: c; c-file-style: "openbsd" -*- */
1 /*
2 * Copyright (c) 2013 Vincent Bernat <bernat@luffy.cx>
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17 #define _GNU_SOURCE 1
18 #include <stdio.h>
19 #include <stdlib.h>
20 #include <string.h>
21 #include <arpa/inet.h>
22 #include "fixedpoint.h"
23
24 /* This is not a general purpose fixed point library. First, there is no
25 * arithmetic. Second, some functions assume that the total precision does not
26 * exceed 64 bits.
27 */
28
29 #ifdef ENABLE_LLDPMED
30
31 #define ntohll(x) \
32 (((u_int64_t)(ntohl((int)(((x) << 32) >> 32))) << 32) | \
33 (unsigned int)ntohl(((int)((x) >> 32))))
34
35 /**
36 * Convert a string to fixed point number.
37 *
38 * @param repr String to convert.
39 * @param end If not NULL, will contain a pointer to the character after the
40 * last character used in the conversion.
41 * @param intbits Number of bits to represent the integer part.
42 * @param fltbits Number of bits to represent the float part.
43 * @return A fixed point number.
44 *
45 * If there is an overflow, there will be a truncation. Moreover, the fraction
46 * part will be rounded to the nearest possible power of two representation. The
47 * point will depend on the number of decimal provided with the fraction
48 * part.
49 */
50 struct fp_number
51 fp_strtofp(const char *repr, char **end,
52 unsigned intbits, unsigned fltbits)
53 {
54 char *endptr = NULL, *e2;
55 struct fp_number result = {
56 .integer = { 0, intbits },
57 .fraction = { 0, fltbits, 0 }
58 };
59 result.integer.value = strtoll(repr, &endptr, 10);
60 if (result.integer.value >= (1LL << (intbits - 1)))
61 result.integer.value = (1LL << (intbits - 1)) - 1;
62 else if (result.integer.value < ~(1LL << (intbits - 1)) + 1)
63 result.integer.value = ~(1LL << (intbits - 1)) + 1;
64 if (*endptr == '.') {
65 long long precision = 1;
66 e2 = endptr + 1;
67 result.fraction.value = strtoll(e2, &endptr, 10);
68 /* Convert to a representation in power of two. Get the
69 * precision from the number of digits provided. This is NOT the
70 * value of the higher bits in the binary representation: we
71 * consider that if the user inputs, 0.9375, it means to
72 * represent anything between 0 and 0.9999 with the same
73 * precision. Therefore, we don't have only 4 bits of precision
74 * but 14. */
75 while (e2++ != endptr) precision *= 10;
76 result.fraction.value <<= fltbits;
77 result.fraction.value /= precision;
78 result.fraction.precision = (precision == 1)?1:
79 (sizeof(precision) * 8 - __builtin_clzll(precision - 1));
80 if (result.fraction.precision > fltbits)
81 result.fraction.precision = fltbits;
82 }
83 if (end) *end = endptr;
84 return result;
85 }
86
87 /**
88 * Get a string representation of a fixed point number.
89 *
90 * @param fp Fixed point number.
91 * @param suffix If not NULL, use the first character when positive and the
92 * second one when negative instead of prefixing by `-`.
93 * @return the string representation
94 *
95 * Since we convert from binary to decimal, we are as precise as the binary
96 * representation.
97 */
98 char *
99 fp_fptostr(struct fp_number fp, const char *suffix)
100 {
101 char *result = NULL;
102 char *frac = NULL;
103 int negative = (fp.integer.value < 0);
104 if (fp.fraction.value == 0)
105 frac = strdup("");
106 else {
107 long long decimal = fp.fraction.value;
108 long long precision = 1;
109 int len = 0;
110 while ((1LL << fp.fraction.precision) > precision) {
111 precision *= 10;
112 len += 1;
113 }
114 /* We did round-up, when converting from decimal. We round-down
115 * to have some coherency. */
116 precision /= 10; len -= 1;
117 if (precision == 0) precision = 1;
118 decimal *= precision;
119 decimal >>= fp.fraction.bits;
120 if (asprintf(&frac, ".%0*llu", len, decimal) == -1)
121 return NULL;
122 }
123 if (asprintf(&result, "%s%llu%s%c",
124 (suffix == NULL && negative) ? "-" : "",
125 (negative) ? (-fp.integer.value) : fp.integer.value,
126 frac,
127 (suffix && !negative) ? suffix[0] :
128 (suffix && negative) ? suffix[1] : ' ') == -1) {
129 free(frac);
130 return NULL;
131 }
132 free(frac);
133 if (!suffix) result[strlen(result) - 1] = '\0';
134 return result;
135 }
136
137 /**
138 * Turn a fixed point number into its representation in a buffer.
139 *
140 * @param fp Fixed point number.
141 * @param buf Output buffer.
142 * @param shift Number of bits to skip at the beginning of the buffer.
143 *
144 * The representation of a fixed point number is the precision (always 6 bits
145 * because we assume that int part + frac part does not exceed 64 bits), the
146 * integer part and the fractional part.
147 */
148 void
149 fp_fptobuf(struct fp_number fp, unsigned char *buf, unsigned shift)
150 {
151 unsigned long long value = (fp.integer.value >= 0) ?
152 ((fp.integer.value << fp.fraction.bits) + fp.fraction.value) :
153 (~(((unsigned long long)(-fp.integer.value) << fp.fraction.bits) +
154 fp.fraction.value) + 1);
155 unsigned long long ints[] = { fp.integer.bits + fp.fraction.precision,
156 value };
157 unsigned int bits[] = { 6,
158 fp.integer.bits + fp.fraction.bits };
159
160 unsigned i, obit, o;
161 for (i = 0, obit = 8 - (shift % 8), o = shift / 8; i < 2;) {
162 if (obit > bits[i]) {
163 /* We need to clear bits that will be overwritten but do not touch other bits */
164 buf[o] = buf[o] & (~((1 << obit) - 1) |
165 ((1 << (obit - bits[i])) - 1));
166 buf[o] = buf[o] |
167 ((ints[i] & ((1 << bits[i]) - 1)) << (obit - bits[i]));
168 obit -= bits[i];
169 i++;
170 } else {
171 /* As in the other branch... */
172 buf[o] = buf[o] & (~((1 << obit) - 1));
173 buf[o] = buf[o] |
174 ((ints[i] >> (bits[i] - obit)) & ((1 << obit) - 1));
175 bits[i] -= obit;
176 obit = 8;
177 o++;
178 }
179 }
180 }
181
182 /**
183 * Parse a fixed point number from a buffer.
184 *
185 * @param buf Input buffer
186 * @param intbits Number of bits used for integer part.
187 * @param fltbits Number of bits used for fractional part.
188 * @param shift Number of bits to skip at the beginning of the buffer.
189 *
190 * @return the parsed fixed point number.
191 *
192 * The representation is the same as for @c fp_fptobuf().
193 */
194 struct fp_number
195 fp_buftofp(const unsigned char *buf,
196 unsigned intbits, unsigned fltbits,
197 unsigned shift)
198 {
199 unsigned long long value = 0, precision = 0;
200 unsigned long long *ints[] = { &precision,
201 &value };
202 unsigned int bits[] = { 6,
203 intbits + fltbits };
204
205 unsigned o, ibit, i;
206 for (o = 0, ibit = 8 - (shift % 8), i = shift / 8; o < 2;) {
207 if (ibit > bits[o]) {
208 *ints[o] = *ints[o] | ((buf[i] >> (ibit - bits[o])) & ((1ULL << bits[o]) - 1));
209 ibit -= bits[o];
210 o++;
211 } else {
212 *ints[o] = *ints[o] | ((buf[i] & ((1ULL << ibit) - 1)) << (bits[o] - ibit));
213 bits[o] -= ibit;
214 ibit = 8;
215 i++;
216 }
217 }
218
219 /* Don't handle too low precision */
220 if (precision > intbits)
221 precision -= intbits;
222 else
223 precision = intbits;
224
225 int negative = !!(value & (1ULL << (intbits + fltbits - 1)));
226 if (negative) value = (~value + 1) & ((1ULL << (intbits + fltbits - 1)) - 1);
227 struct fp_number result = {
228 .integer = { value >> fltbits, intbits },
229 .fraction = { value & ((1ULL << fltbits) - 1), fltbits, precision }
230 };
231 if (negative) result.integer.value = -result.integer.value;
232
233 return result;
234 }
235
236 /**
237 * Negate a fixed point number.
238 */
239 struct fp_number
240 fp_negate(struct fp_number fp)
241 {
242 unsigned intbits = fp.integer.bits;
243 struct fp_number result = fp;
244 result.integer.value = -result.integer.value;
245 if (result.integer.value >= (1LL << (intbits - 1)))
246 result.integer.value = (1LL << (intbits - 1)) - 1;
247 else if (result.integer.value < ~(1LL << (intbits - 1)) + 1)
248 result.integer.value = ~(1LL << (intbits - 1)) + 1;
249 return result;
250 }
251
252 #endif
0 /* -*- mode: c; c-file-style: "openbsd" -*- */
1 /*
2 * Copyright (c) 2012 Vincent Bernat <bernat@luffy.cx>
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17 #if HAVE_CONFIG_H
18 # include <config.h>
19 #endif
20
21 #if ! defined FIXEDPOINT_H && defined ENABLE_LLDPMED
22 #define FIXEDPOINT_H
23
24 struct fp_number {
25 struct {
26 long long value;
27 unsigned bits;
28 } integer;
29 struct {
30 long long value;
31 unsigned bits;
32 unsigned precision;
33 } fraction;
34 };
35 struct fp_number fp_strtofp(const char *, char **, unsigned, unsigned);
36 struct fp_number fp_buftofp(const unsigned char *, unsigned, unsigned, unsigned);
37 struct fp_number fp_negate(struct fp_number);
38 char *fp_fptostr(struct fp_number, const char *);
39 void fp_fptobuf(struct fp_number, unsigned char *, unsigned);
40
41 #endif
707707 lldpctl_k_insert_cnt, /**< `(I)` insert cnt. Only works for a local port. */
708708 lldpctl_k_delete_cnt, /**< `(I)` delete cnt. Only works for a local port. */
709709 lldpctl_k_config_tx_hold, /**< `(I,WO)` Transmit hold interval. */
710 lldpctl_k_config_bond_slave_src_mac_type, /**< `(I,WO)` bond slave src mac type. */
710711 } lldpctl_key_t;
711712
712713 /**
215215 #define LLDPD_MODE_MAX LLDPD_MODE_FDP
216216
217217
218 /* Bond slave src mac type constants */
219 #define LLDP_BOND_SLAVE_SRC_MAC_TYPE_UNKNOWN 0
220 #define LLDP_BOND_SLAVE_SRC_MAC_TYPE_REAL 1
221 #define LLDP_BOND_SLAVE_SRC_MAC_TYPE_ZERO 2
222 #define LLDP_BOND_SLAVE_SRC_MAC_TYPE_FIXED 3
223 #define LLDP_BOND_SLAVE_SRC_MAC_TYPE_LOCALLY_ADMINISTERED 4
224 #define LLDP_BOND_SLAVE_SRC_MAC_TYPE_MAX LLDP_BOND_SLAVE_SRC_MAC_TYPE_LOCALLY_ADMINISTERED
225
218226 #endif /* _LLDP_H */
102102 }
103103 #endif
104104
105 /* Cleanup a remote port. The last argument, `expire` is a function that should
106 * be called when expiration happens. If it is NULL, all remote ports are
107 * removed. */
105 /* Cleanup a remote port. The before last argument, `expire` is a function that
106 * should be called when a remote port is removed. If the last argument is 1,
107 * all remote ports are removed.
108 */
108109 void
109110 lldpd_remote_cleanup(struct lldpd_hardware *hardware,
110 void(*expire)(struct lldpd_hardware *, struct lldpd_port *))
111 void(*expire)(struct lldpd_hardware *, struct lldpd_port *),
112 int all)
111113 {
112114 struct lldpd_port *port, *port_next;
113115 int del;
119121 port != NULL;
120122 port = port_next) {
121123 port_next = TAILQ_NEXT(port, p_entries);
122 del = (expire == NULL);
123 if (expire &&
124 del = all;
125 if (!all && expire &&
124126 (now - port->p_lastupdate >= port->p_chassis->c_ttl)) {
125127 hardware->h_ageout_cnt++;
126128 hardware->h_delete_cnt++;
127 expire(hardware, port);
128129 del = 1;
129130 }
130131 if (del) {
131 if (expire)
132 TAILQ_REMOVE(&hardware->h_rports, port, p_entries);
132 if (expire) expire(hardware, port);
133 /* This TAILQ_REMOVE is dangerous. It should not be
134 * called while in liblldpctl because we don't have a
135 * real list. It is only needed to be called when we
136 * don't delete the entire list. */
137 if (!all) TAILQ_REMOVE(&hardware->h_rports, port, p_entries);
133138 lldpd_port_cleanup(port, 1);
134139 free(port);
135140 }
136141 }
137 if (!expire) TAILQ_INIT(&hardware->h_rports);
142 if (all) TAILQ_INIT(&hardware->h_rports);
138143 }
139144
140145 /* If `all' is true, clear all information, including information that
332332 int c_tx_fast_interval; /* Time intr between sends during fast start */
333333 #endif
334334 int c_tx_hold; /* Transmit hold */
335 int c_bond_slave_src_mac_type; /* Src mac type in lldp frames over bond
336 slaves */
335337 };
336338 MARSHAL_BEGIN(lldpd_config)
337339 MARSHAL_STR(lldpd_config, c_mgmt_pattern)
368370 struct lldpd *h_cfg; /* Pointer to main configuration */
369371 void *h_recv; /* FD for reception */
370372 int h_sendfd; /* FD for sending, only used by h_ops */
373 int h_mangle; /* 1 if we have to mangle the MAC address */
371374 struct lldpd_ops *h_ops; /* Hardware-dependent functions */
372375 void *h_data; /* Hardware-dependent data */
373376 void *h_timer; /* Timer for this port */
436439 void lldpd_chassis_mgmt_cleanup(struct lldpd_chassis *);
437440 void lldpd_chassis_cleanup(struct lldpd_chassis *, int);
438441 void lldpd_remote_cleanup(struct lldpd_hardware *,
439 void(*expire)(struct lldpd_hardware *, struct lldpd_port *));
442 void(*expire)(struct lldpd_hardware *, struct lldpd_port *),
443 int);
440444 void lldpd_port_cleanup(struct lldpd_port *, int);
441445 void lldpd_config_cleanup(struct lldpd_config *);
442446 #ifdef ENABLE_DOT1
00 AM_CFLAGS = -I $(top_srcdir)/include
1 TESTS = check_marshal check_lldp check_cdp check_sonmp check_edp
21
32 if HAVE_CHECK
3
4 TESTS = check_marshal check_lldp check_cdp check_sonmp check_edp check_fixedpoint
5 AM_CFLAGS += @CHECK_CFLAGS@
6 LDADD = $(top_builddir)/src/daemon/liblldpd.la @CHECK_LIBS@ @LIBEVENT_LDFLAGS@
47
58 check_marshal_SOURCES = check_marshal.c \
69 $(top_srcdir)/src/marshal.h
2124 $(top_srcdir)/src/daemon/lldpd.h \
2225 common.h common.c
2326
24 AM_CFLAGS += @CHECK_CFLAGS@
25 LDADD = $(top_builddir)/src/daemon/liblldpd.la @CHECK_LIBS@ @LIBEVENT_LDFLAGS@
27 check_fixedpoint_SOURCES = check_fixedpoint.c
28 check_fixedpoint_LDADD = $(top_builddir)/src/lib/libfixedpoint.la $(LDADD)
2629
2730 if USE_SNMP
2831 TESTS += check_snmp
0 # Makefile.in generated by automake 1.13.3 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
33 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
7676 POST_UNINSTALL = :
7777 build_triplet = @build@
7878 host_triplet = @host@
79 TESTS = check_marshal$(EXEEXT) check_lldp$(EXEEXT) check_cdp$(EXEEXT) \
80 check_sonmp$(EXEEXT) check_edp$(EXEEXT) $(am__EXEEXT_1)
79 @HAVE_CHECK_TRUE@TESTS = check_marshal$(EXEEXT) check_lldp$(EXEEXT) \
80 @HAVE_CHECK_TRUE@ check_cdp$(EXEEXT) check_sonmp$(EXEEXT) \
81 @HAVE_CHECK_TRUE@ check_edp$(EXEEXT) check_fixedpoint$(EXEEXT) \
82 @HAVE_CHECK_TRUE@ $(am__EXEEXT_1)
8183 @HAVE_CHECK_TRUE@am__append_1 = @CHECK_CFLAGS@
8284 @HAVE_CHECK_TRUE@@USE_SNMP_TRUE@am__append_2 = check_snmp
8385 @HAVE_CHECK_TRUE@check_PROGRAMS = $(am__EXEEXT_2)
9496 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
9597 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
9698 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/os.m4 \
97 $(top_srcdir)/m4/progname.m4 $(top_srcdir)/m4/snmp.m4 \
98 $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/xml2.m4 \
99 $(top_srcdir)/m4/progname.m4 $(top_srcdir)/m4/seccomp.m4 \
100 $(top_srcdir)/m4/snmp.m4 $(top_srcdir)/m4/stdint.m4 \
101 $(top_srcdir)/m4/systemtap.m4 $(top_srcdir)/m4/xml2.m4 \
99102 $(top_srcdir)/configure.ac
100103 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
101104 $(ACLOCAL_M4)
104107 CONFIG_CLEAN_FILES =
105108 CONFIG_CLEAN_VPATH_FILES =
106109 @HAVE_CHECK_TRUE@@USE_SNMP_TRUE@am__EXEEXT_1 = check_snmp$(EXEEXT)
107 am__EXEEXT_2 = check_marshal$(EXEEXT) check_lldp$(EXEEXT) \
108 check_cdp$(EXEEXT) check_sonmp$(EXEEXT) check_edp$(EXEEXT) \
109 $(am__EXEEXT_1)
110 @HAVE_CHECK_TRUE@am__EXEEXT_2 = check_marshal$(EXEEXT) \
111 @HAVE_CHECK_TRUE@ check_lldp$(EXEEXT) check_cdp$(EXEEXT) \
112 @HAVE_CHECK_TRUE@ check_sonmp$(EXEEXT) check_edp$(EXEEXT) \
113 @HAVE_CHECK_TRUE@ check_fixedpoint$(EXEEXT) $(am__EXEEXT_1)
110114 am__check_cdp_SOURCES_DIST = check_cdp.c \
111115 $(top_srcdir)/src/daemon/lldpd.h common.h common.c
112116 @HAVE_CHECK_TRUE@am_check_cdp_OBJECTS = check_cdp.$(OBJEXT) \
127131 check_edp_LDADD = $(LDADD)
128132 @HAVE_CHECK_TRUE@check_edp_DEPENDENCIES = \
129133 @HAVE_CHECK_TRUE@ $(top_builddir)/src/daemon/liblldpd.la
134 am__check_fixedpoint_SOURCES_DIST = check_fixedpoint.c
135 @HAVE_CHECK_TRUE@am_check_fixedpoint_OBJECTS = \
136 @HAVE_CHECK_TRUE@ check_fixedpoint.$(OBJEXT)
137 check_fixedpoint_OBJECTS = $(am_check_fixedpoint_OBJECTS)
138 @HAVE_CHECK_TRUE@am__DEPENDENCIES_1 = \
139 @HAVE_CHECK_TRUE@ $(top_builddir)/src/daemon/liblldpd.la
140 @HAVE_CHECK_TRUE@check_fixedpoint_DEPENDENCIES = \
141 @HAVE_CHECK_TRUE@ $(top_builddir)/src/lib/libfixedpoint.la \
142 @HAVE_CHECK_TRUE@ $(am__DEPENDENCIES_1)
130143 am__check_lldp_SOURCES_DIST = check_lldp.c \
131144 $(top_srcdir)/src/daemon/lldpd.h common.h common.c
132145 @HAVE_CHECK_TRUE@am_check_lldp_OBJECTS = check_lldp.$(OBJEXT) \
194207 am__v_CCLD_0 = @echo " CCLD " $@;
195208 am__v_CCLD_1 =
196209 SOURCES = $(check_cdp_SOURCES) $(check_edp_SOURCES) \
197 $(check_lldp_SOURCES) $(check_marshal_SOURCES) \
198 $(check_snmp_SOURCES) $(check_sonmp_SOURCES)
210 $(check_fixedpoint_SOURCES) $(check_lldp_SOURCES) \
211 $(check_marshal_SOURCES) $(check_snmp_SOURCES) \
212 $(check_sonmp_SOURCES)
199213 DIST_SOURCES = $(am__check_cdp_SOURCES_DIST) \
200 $(am__check_edp_SOURCES_DIST) $(am__check_lldp_SOURCES_DIST) \
214 $(am__check_edp_SOURCES_DIST) \
215 $(am__check_fixedpoint_SOURCES_DIST) \
216 $(am__check_lldp_SOURCES_DIST) \
201217 $(am__check_marshal_SOURCES_DIST) \
202218 $(am__check_snmp_SOURCES_DIST) $(am__check_sonmp_SOURCES_DIST)
203219 am__can_run_installinfo = \
455471 DLLTOOL = @DLLTOOL@
456472 DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
457473 DSYMUTIL = @DSYMUTIL@
474 DTRACE = @DTRACE@
458475 DUMPBIN = @DUMPBIN@
459476 DX_CONFIG = @DX_CONFIG@
460477 DX_DOCDIR = @DX_DOCDIR@
493510 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
494511 JANSSON_CFLAGS = @JANSSON_CFLAGS@
495512 JANSSON_LIBS = @JANSSON_LIBS@
513 LAUNCHDDAEMONSDIR = @LAUNCHDDAEMONSDIR@
496514 LD = @LD@
497515 LDFLAGS = @LDFLAGS@
498516 LIBEVENT_CFLAGS = @LIBEVENT_CFLAGS@
533551 PRIVSEP_USER = @PRIVSEP_USER@
534552 RANLIB = @RANLIB@
535553 READLINE_LIBS = @READLINE_LIBS@
554 SECCOMP_CFLAGS = @SECCOMP_CFLAGS@
555 SECCOMP_LIBS = @SECCOMP_LIBS@
536556 SED = @SED@
537557 SET_MAKE = @SET_MAKE@
538558 SHELL = @SHELL@
539559 STRIP = @STRIP@
560 SYSTEMDSYSTEMUNITDIR = @SYSTEMDSYSTEMUNITDIR@
540561 VERSION = @VERSION@
541562 XML2_CFLAGS = @XML2_CFLAGS@
542563 XML2_CONFIG = @XML2_CONFIG@
575596 includedir = @includedir@
576597 infodir = @infodir@
577598 install_sh = @install_sh@
599 launchddaemonsdir = @launchddaemonsdir@
578600 libdir = @libdir@
579601 libexecdir = @libexecdir@
580602 localedir = @localedir@
591613 srcdir = @srcdir@
592614 subdirs = @subdirs@
593615 sysconfdir = @sysconfdir@
616 systemdsystemunitdir = @systemdsystemunitdir@
594617 target_alias = @target_alias@
595618 top_build_prefix = @top_build_prefix@
596619 top_builddir = @top_builddir@
597620 top_srcdir = @top_srcdir@
598621 AM_CFLAGS = -I $(top_srcdir)/include $(am__append_1)
622 @HAVE_CHECK_TRUE@LDADD = $(top_builddir)/src/daemon/liblldpd.la @CHECK_LIBS@ @LIBEVENT_LDFLAGS@
599623 @HAVE_CHECK_TRUE@check_marshal_SOURCES = check_marshal.c \
600624 @HAVE_CHECK_TRUE@ $(top_srcdir)/src/marshal.h
601625
615639 @HAVE_CHECK_TRUE@ $(top_srcdir)/src/daemon/lldpd.h \
616640 @HAVE_CHECK_TRUE@ common.h common.c
617641
618 @HAVE_CHECK_TRUE@LDADD = $(top_builddir)/src/daemon/liblldpd.la @CHECK_LIBS@ @LIBEVENT_LDFLAGS@
642 @HAVE_CHECK_TRUE@check_fixedpoint_SOURCES = check_fixedpoint.c
643 @HAVE_CHECK_TRUE@check_fixedpoint_LDADD = $(top_builddir)/src/lib/libfixedpoint.la $(LDADD)
619644 @HAVE_CHECK_TRUE@@USE_SNMP_TRUE@check_snmp_SOURCES = check_snmp.c \
620645 @HAVE_CHECK_TRUE@@USE_SNMP_TRUE@ $(top_srcdir)/src/daemon/lldpd.h \
621646 @HAVE_CHECK_TRUE@@USE_SNMP_TRUE@ $(top_srcdir)/src/daemon/agent.h
675700 @rm -f check_edp$(EXEEXT)
676701 $(AM_V_CCLD)$(LINK) $(check_edp_OBJECTS) $(check_edp_LDADD) $(LIBS)
677702
703 check_fixedpoint$(EXEEXT): $(check_fixedpoint_OBJECTS) $(check_fixedpoint_DEPENDENCIES) $(EXTRA_check_fixedpoint_DEPENDENCIES)
704 @rm -f check_fixedpoint$(EXEEXT)
705 $(AM_V_CCLD)$(LINK) $(check_fixedpoint_OBJECTS) $(check_fixedpoint_LDADD) $(LIBS)
706
678707 check_lldp$(EXEEXT): $(check_lldp_OBJECTS) $(check_lldp_DEPENDENCIES) $(EXTRA_check_lldp_DEPENDENCIES)
679708 @rm -f check_lldp$(EXEEXT)
680709 $(AM_V_CCLD)$(LINK) $(check_lldp_OBJECTS) $(check_lldp_LDADD) $(LIBS)
699728
700729 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_cdp.Po@am__quote@
701730 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_edp.Po@am__quote@
731 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_fixedpoint.Po@am__quote@
702732 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_lldp.Po@am__quote@
703733 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_marshal.Po@am__quote@
704734 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_snmp.Po@am__quote@
710740 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
711741 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
712742 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
713 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
743 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
714744
715745 .c.obj:
716746 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
717747 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
718748 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
719749 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
720 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
750 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
721751
722752 .c.lo:
723753 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
960990 --log-file $$b.log --trs-file $$b.trs \
961991 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
962992 "$$tst" $(AM_TESTS_FD_REDIRECT)
993 check_fixedpoint.log: check_fixedpoint$(EXEEXT)
994 @p='check_fixedpoint$(EXEEXT)'; \
995 b='check_fixedpoint'; \
996 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
997 --log-file $$b.log --trs-file $$b.trs \
998 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
999 "$$tst" $(AM_TESTS_FD_REDIRECT)
9631000 check_snmp.log: check_snmp$(EXEEXT)
9641001 @p='check_snmp$(EXEEXT)'; \
9651002 b='check_snmp'; \
0 /* -*- mode: c; c-file-style: "openbsd" -*- */
1 /*
2 * Copyright (c) 2012 Vincent Bernat <bernat@luffy.cx>
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17 #include <check.h>
18 #include <stdlib.h>
19
20 #include "../src/lib/fixedpoint.h"
21
22 #ifdef ENABLE_LLDPMED
23
24 START_TEST(test_string_parsing_suffix) {
25 char *end;
26 fp_strtofp("4541T", &end, 14, 8);
27 ck_assert_int_eq(*end, 'T');
28 fp_strtofp("4541.U", &end, 14, 8);
29 ck_assert_int_eq(*end, 'U');
30 fp_strtofp("4541.676V", &end, 14, 8);
31 ck_assert_int_eq(*end, 'V');
32 }
33 END_TEST
34
35 START_TEST(test_string_parsing_positive_int) {
36 struct fp_number fp = fp_strtofp("4541T", NULL, 14, 8);
37 ck_assert_int_eq(fp.integer.bits, 14);
38 ck_assert_int_eq(fp.integer.value, 4541);
39 ck_assert_int_eq(fp.fraction.bits, 8);
40 ck_assert_int_eq(fp.fraction.value, 0);
41 ck_assert_int_eq(fp.fraction.precision, 0);
42 }
43 END_TEST
44
45 START_TEST(test_string_parsing_negative_int) {
46 struct fp_number fp = fp_strtofp("-4214N", NULL, 14, 8);
47 ck_assert_int_eq(fp.integer.bits, 14);
48 ck_assert_int_eq(fp.integer.value, -4214);
49 ck_assert_int_eq(fp.fraction.bits, 8);
50 ck_assert_int_eq(fp.fraction.value, 0);
51 ck_assert_int_eq(fp.fraction.precision, 0);
52 }
53 END_TEST
54
55 START_TEST(test_string_parsing_positive_int_overflow) {
56 struct fp_number fp1 = fp_strtofp("4098", NULL, 13, 8);
57 struct fp_number fp2 = fp_strtofp("4096", NULL, 13, 8);
58 struct fp_number fp3 = fp_strtofp("4095", NULL, 13, 8);
59 struct fp_number fp4 = fp_strtofp("4094", NULL, 13, 8);
60 ck_assert_int_eq(fp1.integer.value, 4095);
61 ck_assert_int_eq(fp2.integer.value, 4095);
62 ck_assert_int_eq(fp3.integer.value, 4095);
63 ck_assert_int_eq(fp4.integer.value, 4094);
64 }
65 END_TEST
66
67 START_TEST(test_string_parsing_negative_int_overflow) {
68 struct fp_number fp1 = fp_strtofp("-4097", NULL, 13, 8);
69 struct fp_number fp2 = fp_strtofp("-4096", NULL, 13, 8);
70 struct fp_number fp3 = fp_strtofp("-4095", NULL, 13, 8);
71 struct fp_number fp4 = fp_strtofp("-4094", NULL, 13, 8);
72 ck_assert_int_eq(fp1.integer.value, -4096);
73 ck_assert_int_eq(fp2.integer.value, -4096);
74 ck_assert_int_eq(fp3.integer.value, -4095);
75 ck_assert_int_eq(fp4.integer.value, -4094);
76 }
77 END_TEST
78
79 START_TEST(test_string_parsing_positive_float) {
80 struct fp_number fp1 = fp_strtofp("1542.6250E", NULL, 13, 20);
81 ck_assert_int_eq(fp1.integer.value, 1542);
82 ck_assert_int_eq(fp1.fraction.precision, 14);
83 ck_assert_int_eq((fp1.fraction.value * 10000) >> fp1.fraction.bits, 6250);
84
85 struct fp_number fp2 = fp_strtofp("1542.06250E", NULL, 13, 4);
86 ck_assert_int_eq(fp2.integer.value, 1542);
87 ck_assert_int_eq(fp2.fraction.precision, 4);
88 ck_assert_int_eq((fp2.fraction.value * 10000) >> fp2.fraction.bits, 625);
89 }
90 END_TEST
91
92 START_TEST(test_string_parsing_negative_float) {
93 struct fp_number fp = fp_strtofp("-11542.6250N", NULL, 15, 4);
94 ck_assert_int_eq(fp.integer.value, -11542);
95 ck_assert_int_eq(fp.fraction.precision, 4);
96 ck_assert_int_eq((fp.fraction.value * 10000) >> fp.fraction.bits, 6250);
97 }
98 END_TEST
99
100 START_TEST(test_string_parsing_no_fract_part) {
101 struct fp_number fp = fp_strtofp("11542.", NULL, 15, 4);
102 ck_assert_int_eq(fp.integer.value, 11542);
103 ck_assert_int_eq(fp.fraction.value, 0);
104 ck_assert_int_eq(fp.fraction.precision, 1);
105 }
106 END_TEST
107
108 START_TEST(test_string_parsing_no_int_part) {
109 struct fp_number fp = fp_strtofp(".6250E", NULL, 13, 4);
110 ck_assert_int_eq(fp.integer.value, 0);
111 ck_assert_int_eq(fp.fraction.precision, 4);
112 ck_assert_int_eq((fp.fraction.value * 10000) >> fp.fraction.bits, 6250);
113 }
114 END_TEST
115
116
117 START_TEST(test_string_representation_positive_int) {
118 struct fp_number fp1 = fp_strtofp("214", NULL, 9, 9);
119 struct fp_number fp2 = fp_strtofp("11178.0000", NULL, 15, 9);
120 ck_assert_str_eq(fp_fptostr(fp1, NULL), "214");
121 ck_assert_str_eq(fp_fptostr(fp2, NULL), "11178");
122 ck_assert_str_eq(fp_fptostr(fp2, "ES"), "11178E");
123 }
124 END_TEST
125
126 START_TEST(test_string_representation_negative_int) {
127 struct fp_number fp1 = fp_strtofp("-214", NULL, 9, 9);
128 struct fp_number fp2 = fp_strtofp("-11178.0000", NULL, 15, 9);
129 ck_assert_str_eq(fp_fptostr(fp1, NULL), "-214");
130 ck_assert_str_eq(fp_fptostr(fp2, NULL), "-11178");
131 ck_assert_str_eq(fp_fptostr(fp2, "ES"), "11178S");
132 }
133 END_TEST
134
135 START_TEST(test_string_representation_positive_float) {
136 struct fp_number fp = fp_strtofp("214.6250", NULL, 9, 20);
137 ck_assert_str_eq(fp_fptostr(fp, NULL), "214.6250");
138 ck_assert_str_eq(fp_fptostr(fp, "ES"), "214.6250E");
139 }
140 END_TEST
141
142 START_TEST(test_string_representation_positive_float_with_leading_zero) {
143 struct fp_number fp = fp_strtofp("214.06250", NULL, 9, 24);
144 ck_assert_str_eq(fp_fptostr(fp, NULL), "214.06250");
145 ck_assert_str_eq(fp_fptostr(fp, "ES"), "214.06250E");
146 }
147 END_TEST
148
149 START_TEST(test_string_representation_negative_float) {
150 struct fp_number fp1 = fp_strtofp("-214.625", NULL, 22, 10);
151 struct fp_number fp2 = fp_strtofp("-415.5", NULL, 22, 4);
152 ck_assert_str_eq(fp_fptostr(fp1, NULL), "-214.625");
153 ck_assert_str_eq(fp_fptostr(fp2, NULL), "-415.5");
154 ck_assert_str_eq(fp_fptostr(fp2, "ES"), "415.5S");
155 }
156 END_TEST
157
158 START_TEST(test_buffer_representation_positive_float) {
159 unsigned char buffer[5] = {};
160 unsigned char expected[] = { 0x21 << 2, 47 << 1, 0x68, 0x00, 0x00 };
161 /* 47.2031250 = 47 + 2**-3 + 2**-4 + 2**-6, precision = 9+24 */
162 struct fp_number fp = fp_strtofp("47.2031250", NULL, 9, 25);
163 fp_fptobuf(fp, buffer, 0);
164 fail_unless(memcmp(buffer, expected, sizeof(expected)) == 0);
165 }
166 END_TEST
167
168 START_TEST(test_buffer_representation_negative_float) {
169 unsigned char buffer[5] = {};
170 unsigned char expected[] = { (0x21 << 2) | 3, 0xa1, 0x98, 0x00, 0x00 };
171 /* 47.2031250 = 000101111.0011010000000000000000000 */
172 /* -47.2031250 = 111010000.1100101111111111111111111 + 1 */
173 /* -47.2031250 = 111010000.1100110000000000000000000 */
174 struct fp_number fp = fp_strtofp("-47.2031250", NULL, 9, 25);
175 fp_fptobuf(fp, buffer, 0);
176 fail_unless(memcmp(buffer, expected, sizeof(expected)) == 0);
177 }
178 END_TEST
179
180 START_TEST(test_buffer_representation_with_shift) {
181 unsigned char buffer[] = { 0x77, 0xc6, 0x0, 0x0, 0x0, 0x0, 0xc7 };
182 unsigned char expected[] = { 0x77, 0xc8, 0x45, 0xe6, 0x80, 0x00, 0x07 };
183 struct fp_number fp = fp_strtofp("47.2031250", NULL, 9, 25);
184 fp_fptobuf(fp, buffer, 12);
185 fail_unless(memcmp(buffer, expected, sizeof(buffer)) == 0);
186 }
187 END_TEST
188
189 START_TEST(test_buffer_representation_altitude) {
190 unsigned char buffer[5] = {};
191 unsigned char expected[] = { (22 + 4) << 2, 0, 0, 14 << 4 | 1 << 3, 0 };
192 struct fp_number fp = fp_strtofp("14.5", NULL, 22, 8);
193 fp_fptobuf(fp, buffer, 0);
194 fail_unless(memcmp(buffer, expected, sizeof(buffer)) == 0);
195 }
196 END_TEST
197
198 START_TEST(test_buffer_parsing_positive_float) {
199 unsigned char buffer[] = { 0x21 << 2, 47 << 1, 0x68, 0x00, 0x00 };
200 struct fp_number fp = fp_buftofp(buffer, 9, 25, 0);
201 ck_assert_int_eq(fp.integer.value, 47);
202 ck_assert_int_eq(fp.integer.bits, 9);
203 ck_assert_int_eq((fp.fraction.value * 10000000) >> fp.fraction.bits, 2031250);
204 ck_assert_int_eq(fp.fraction.bits, 25);
205 ck_assert_int_eq(fp.fraction.precision, 24);
206 }
207 END_TEST
208
209 START_TEST(test_buffer_parsing_negative_float) {
210 unsigned char buffer[] = { (0x21 << 2) | 3, 0xa1, 0x98, 0x00, 0x00 };
211 struct fp_number fp = fp_buftofp(buffer, 9, 25, 0);
212 ck_assert_int_eq(fp.integer.value, -47);
213 ck_assert_int_eq(fp.integer.bits, 9);
214 ck_assert_int_eq((fp.fraction.value * 10000000) >> fp.fraction.bits, 2031250);
215 ck_assert_int_eq(fp.fraction.bits, 25);
216 ck_assert_int_eq(fp.fraction.precision, 24);
217 }
218 END_TEST
219
220 /* This is some corner case */
221 START_TEST(test_buffer_parsing_positive_float_2) {
222 unsigned char buffer[] = { 0x40, 0x9c, 0x80, 0x00, 0x00 };
223 struct fp_number fp = fp_buftofp(buffer, 9, 25, 0);
224 ck_assert_int_eq(fp.integer.value, 78);
225 }
226 END_TEST
227
228 START_TEST(test_buffer_parsing_positive_float_with_shift) {
229 unsigned char buffer[] = { 0x77, 0xc8, 0x45, 0xe6, 0x80, 0x00, 0x07 };
230 struct fp_number fp = fp_buftofp(buffer, 9, 25, 12);
231 ck_assert_int_eq(fp.integer.value, 47);
232 ck_assert_int_eq(fp.integer.bits, 9);
233 ck_assert_int_eq((fp.fraction.value * 10000000) >> fp.fraction.bits, 2031250);
234 ck_assert_int_eq(fp.fraction.bits, 25);
235 ck_assert_int_eq(fp.fraction.precision, 24);
236 }
237 END_TEST
238
239 START_TEST(test_buffer_parsing_negative_float_with_shift) {
240 unsigned char buffer[] = { 0x00, 0xff, (0x21 << 2) | 3, 0xa1, 0x98, 0x00, 0x00 };
241 struct fp_number fp = fp_buftofp(buffer, 9, 25, 16);
242 ck_assert_int_eq(fp.integer.value, -47);
243 ck_assert_int_eq(fp.integer.bits, 9);
244 ck_assert_int_eq((fp.fraction.value * 10000000) >> fp.fraction.bits, 2031250);
245 ck_assert_int_eq(fp.fraction.bits, 25);
246 ck_assert_int_eq(fp.fraction.precision, 24);
247 }
248 END_TEST
249
250 START_TEST(test_negate_positive) {
251 struct fp_number fp = fp_strtofp("14.5", NULL, 9, 25);
252 struct fp_number nfp = fp_negate(fp);
253 ck_assert_int_eq(nfp.integer.value, -14);
254 ck_assert_int_eq(fp.fraction.value, nfp.fraction.value);
255 ck_assert_str_eq(fp_fptostr(nfp, NULL), "-14.5");
256 }
257 END_TEST
258
259 START_TEST(test_negate_negative) {
260 struct fp_number fp = fp_strtofp("-14.5", NULL, 9, 25);
261 struct fp_number nfp = fp_negate(fp);
262 ck_assert_int_eq(nfp.integer.value, 14);
263 ck_assert_int_eq(fp.fraction.value, nfp.fraction.value);
264 ck_assert_str_eq(fp_fptostr(nfp, NULL), "14.5");
265 }
266 END_TEST
267
268 #endif
269
270 Suite *
271 fixedpoint_suite(void)
272 {
273 Suite *s = suite_create("Fixed point representation");
274
275 #ifdef ENABLE_LLDPMED
276 TCase *tc_fp = tcase_create("Fixed point representation");
277 tcase_add_test(tc_fp, test_string_parsing_suffix);
278 tcase_add_test(tc_fp, test_string_parsing_positive_int);
279 tcase_add_test(tc_fp, test_string_parsing_negative_int);
280 tcase_add_test(tc_fp, test_string_parsing_no_fract_part);
281 tcase_add_test(tc_fp, test_string_parsing_no_int_part);
282 tcase_add_test(tc_fp, test_string_parsing_positive_int_overflow);
283 tcase_add_test(tc_fp, test_string_parsing_negative_int_overflow);
284 tcase_add_test(tc_fp, test_string_parsing_positive_float);
285 tcase_add_test(tc_fp, test_string_parsing_negative_float);
286 tcase_add_test(tc_fp, test_string_representation_positive_int);
287 tcase_add_test(tc_fp, test_string_representation_negative_int);
288 tcase_add_test(tc_fp, test_string_representation_positive_float);
289 tcase_add_test(tc_fp, test_string_representation_positive_float_with_leading_zero);
290 tcase_add_test(tc_fp, test_string_representation_negative_float);
291 tcase_add_test(tc_fp, test_buffer_representation_positive_float);
292 tcase_add_test(tc_fp, test_buffer_representation_negative_float);
293 tcase_add_test(tc_fp, test_buffer_representation_with_shift);
294 tcase_add_test(tc_fp, test_buffer_representation_altitude);
295 tcase_add_test(tc_fp, test_buffer_parsing_positive_float);
296 tcase_add_test(tc_fp, test_buffer_parsing_positive_float_2);
297 tcase_add_test(tc_fp, test_buffer_parsing_negative_float);
298 tcase_add_test(tc_fp, test_buffer_parsing_positive_float_with_shift);
299 tcase_add_test(tc_fp, test_buffer_parsing_negative_float_with_shift);
300 tcase_add_test(tc_fp, test_negate_positive);
301 tcase_add_test(tc_fp, test_negate_negative);
302 suite_add_tcase(s, tc_fp);
303 #endif
304
305 return s;
306 }
307
308 int
309 main()
310 {
311 int number_failed;
312 Suite *s = fixedpoint_suite();
313 SRunner *sr = srunner_create(s);
314 srunner_run_all(sr, CK_ENV);
315 number_failed = srunner_ntests_failed(sr);
316 srunner_free(sr);
317 return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
318 }