diff --git a/.hgtags b/.hgtags index 99a51e5..e5a31e2 100644 --- a/.hgtags +++ b/.hgtags @@ -8,3 +8,4 @@ e479c8a6598e02a88767104be90786cdab92dc62 release-1.2.0 31e1a7cd0dfd075a7fbdeaed8b4068db100ecb4e release/2.0 6c957b4c920fb69551a5c5800fcf427e272b2e4e release/3-alpha.1 c3349e7c9aa5a2f62949984f0ea68d32eeedfb9e release/2.1 +4e2a9683b6cafeb8e5ad576c13e6808c5a839d66 release/3-alpha.2 diff --git a/.vscode/launch.json b/.vscode/launch.json index ed73ac9..6c682cf 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,12 +6,12 @@ "request": "launch", "name": "(gdb) Launch", "preLaunchTask": "Build", - "program": "${workspaceFolder}/src/xllmnrd", + "program": "${workspaceFolder}/xllmnrd/xllmnrd", "args": [ "--foreground" ], "environment": [], - "cwd": "${workspaceFolder}/src", + "cwd": "${workspaceFolder}/xllmnrd", "MIMode": "gdb", "setupCommands": [ { diff --git a/AUTHORS b/AUTHORS index d66d171..85add38 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1 +1 @@ -Kaz Nishimura +Kaz Nishimura diff --git a/ChangeLog b/ChangeLog index c8aaa00..fd1359c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,205 +1,1610 @@ +2020-06-14 Kaz Nishimura + + * NEWS: Update the news + [79ab3faad280] + + * AUTHORS: Update the email + [7c320c255690] + + * libxllmnrd/rtnetlink.cpp: Use '_os->send' + [d24e29d21b56] + + * libxllmnrd/rtnetlink.cpp, libxllmnrd/rtnetlink.h: Clean up members + [b507a6fd309b] + + * libxllmnrd/interface.h, libxllmnrd/rtnetlink.h: Modify data member + declarations + [43a37102e00d] + +2020-06-13 Kaz Nishimura + + * libxllmnrd/rtnetlink.cpp, libxllmnrd/rtnetlink.h: Rename + 'finish_refresh' + [bcc72e994368] + + * libxllmnrd/rtnetlink.cpp, libxllmnrd/rtnetlink.h: Rename a parameter + [0c78d51715b1] + + * libxllmnrd/rtnetlink.cpp: Modify code formatting + [438b5bb6ddb8] + + * libxllmnrd/interface.h, libxllmnrd/rtnetlink.cpp, + libxllmnrd/rtnetlink.h: Implement asynchronous refresh + [2241fe31fe55] + + * README.md: Update the README file + [e13f66b5e570] + + * configure.ac: Add 'foreign' to the Automake options + [a0f481147f88] + + * README: Remove the 'README' file + [c73d50934ecf] + + * configure.ac: Change the package name + [5e5137a568fb] + + * lsb/Makefile.am, lsb/xllmnrd.in: Use the 'config.status' script to + produce the LSB init script + [402d8ff67153] + + * po/ja.po, po/xllmnrd.pot: Update the message catalogue files + [ff2ec3e11804] + + * azure-pipelines.yml, configure.ac: Change the package version to 3.0 + [7c6ef6758cab] + +2020-06-12 Kaz Nishimura + + * libxllmnrd/rtnetlink.cpp, libxllmnrd/rtnetlink.h: Make 'refresh' + wait for completion + [619aaae6d063] + +2020-06-11 Kaz Nishimura + + * po/ja.po, po/xllmnrd.pot: Regenerate files + [b5e83eb1fdf2] + + * po/POTFILES.in: Fix file locations + [2a3789249eec] + + * test/test_ifaddr.cpp: Add 'sleep' calls after 'ifaddr_start' + [2341a377072c] + + * libxllmnrd/ifaddr.cpp: Add a check for interfaces with no addresses + [6b779d2d5314] + + * libxllmnrd/ifaddr.cpp: Restore tests for the running state + [993ee2731093] + + * libxllmnrd/rtnetlink.h: Add new method 'running' + [560a08ccc1e0] + + * libxllmnrd/ifaddr.cpp: Add a test for the internal state + [0cab725861db] + + * .vscode/launch.json: Update the debugging configuration + [691e3fda70f0] + + * Makefile.am, configure.ac, src/Makefile.am, src/llmnr.c, + src/llmnr.h, src/llmnr_packet.h, src/main.cpp, src/responder.cpp, + src/responder.h, src/xllmnrd.8.in, xllmnrd/Makefile.am, + xllmnrd/llmnr.c, xllmnrd/llmnr.h, xllmnrd/llmnr_packet.h, + xllmnrd/main.cpp, xllmnrd/responder.cpp, xllmnrd/responder.h, + xllmnrd/xllmnrd.8.in: Rename the 'src' directory to 'xllmnrd' + [4fbe35335e7c] + + * libxllmnrd/ifaddr.cpp: Enabled the class-based interface manager + [80b1feff96e0] + + * src/responder.cpp: Add a test to ignore non-IPv6 addresses + [f11f517ab911] + + * libxllmnrd/ifaddr.cpp: Revise conditionally compiled code for + IFADDR_CPLUSPLUS != 0 + [ce71193b3f7a] + + * azure-pipelines.yml: Change the directory for publishing artifacts + [4a590ee2b57e] + +2020-06-08 Kaz Nishimura + + * test/test_rtnetlink.cpp: Add test assertions to compare events + counts + [4d787e82e8fe] + + * libxllmnrd/interface.cpp: Add code to fire interface change events + on address changes + [d00ebbe2edc0] + + * libxllmnrd/interface.cpp: Remove code to erase an empty interface + [4f6b3ccbf0bf] + + * libxllmnrd/interface.cpp: Add code to fire interface change events + in 'remove_interfaces' + [fb665c0b9895] + + * test/test_rtnetlink.cpp: Add '' to a method parameter + [78d445a94c9a] + + * libxllmnrd/interface.cpp: Change method parameters to const + [b022240152a7] + + * libxllmnrd/interface.cpp, libxllmnrd/interface.h: Rename '_mutex' to + '_interfaces_mutex' + [30e8cb6cc668] + + * libxllmnrd/interface.cpp, libxllmnrd/interface.h: Change the new + methods to out-of-line + [138b91324218] + + * libxllmnrd/interface.cpp, libxllmnrd/interface.h: Add new methods + 'in_addresses' and 'in6_addresses' + [f2b8c9ff33ba] + + * ChangeLog: Update the change log + [b7cfd786a862] + +2020-06-07 Kaz Nishimura + + * test/test_rtnetlink.cpp: Add a test for 'set_interface_change' + [219fba469edc] + + * libxllmnrd/interface.h, libxllmnrd/rtnetlink.cpp, + libxllmnrd/rtnetlink.h: Remove the 'start' method from + 'interface_manager' + [e51c598d5f84] + + * configure.ac: Modify configure checks + [43b91b0630b9] + + * configure.ac: Remove checks for 'uintN_t' + [f8321ccdf9b1] + + * configure.ac: Modify library checks + [2ebfbabca893] + + * libxllmnrd/interface.h: Add 'address_family' to the interface change + event class + [c75bfd8ed223] + + * libxllmnrd/interface.h, src/responder.cpp: Modify + 'interface_change_event' with a constructor + [3de0d3d8ad66] + + * libxllmnrd/interface.cpp, libxllmnrd/interface.h: Add member + function 'fire_interface_change' + [521df7cd1c0d] + + * libxllmnrd/interface.cpp, libxllmnrd/interface.h: Use 'std::atomic' + to store interface change handler + [02ccf3bffa40] + + * configure.ac: Add a check for libatomic + [5ad1642a05af] + +2020-06-06 Kaz Nishimura + + * libxllmnrd/ifaddr.cpp, libxllmnrd/interface.h, src/responder.cpp, + test/test_ifaddr.cpp: Rename 'ifaddr_change' to + 'interface_change_event' + [0ebcda6ee471] + + * libxllmnrd/ifaddr.cpp, libxllmnrd/ifaddr.h, + libxllmnrd/interface.cpp, libxllmnrd/interface.h, + test/test_ifaddr.cpp: Remove 'ifaddr_change_handler' in favor of + 'interface_change_handler' + [cd7c13629bc6] + + * libxllmnrd/rtnetlink.cpp, libxllmnrd/rtnetlink.h: Modify + 'rtnetlink_interface_manager' methods + [6b5f9d0cc38b] + +2020-05-28 Kaz Nishimura + + * libxllmnrd/interface.h: Correct the type of a data member + [ba623c09b6f5] + + * libxllmnrd/interface.cpp, libxllmnrd/interface.h: Remove interface + when all its addresses are removed + [c2fc34f8e84c] + + * libxllmnrd/interface.cpp, libxllmnrd/interface.h: Modify the + interface on the interface change handler + [bb339f70b1b8] + + * libxllmnrd/interface.cpp: Modify log messages to include the + addresses + [6621014e7ad5] + + * test/test_rtnetlink.cpp: Add a test method + [249670b41c51] + + * libxllmnrd/posix.cpp, libxllmnrd/posix.h: Add 'recv' and 'send' to + 'posix' + [7eb2cf4d3847] + + * libxllmnrd/interface.cpp: Implement + 'interface_manager::remove_interface_address' + [a8d3851ed525] + + * libxllmnrd/interface.cpp: Implement + 'interface_manager::add_interface_address' + [f793adbb245a] + + * libxllmnrd/rtnetlink.cpp: Call 'remove_interfaces' in + 'rtnetlink_interface_manager::refresh()' + [33189e5ea6fd] + + * libxllmnrd/rtnetlink.cpp, libxllmnrd/rtnetlink.h: Remove + 'rtnetlink_interface_manager::addresses' + [b56499715f04] + + * libxllmnrd/rtnetlink.cpp, libxllmnrd/rtnetlink.h, + test/test_rtnetlink.cpp: Define 'XLLMNRD_RTNETLINK' if the library + supports RTNETLINK + [4df5c5c13bbc] + + * libxllmnrd/interface.cpp, libxllmnrd/interface.h: Remove 'constexpr' + from the specialized 'std::less' methods + [8a7cb0dae65c] + + * test/Makefile.am, test/test_rtnetlink.cpp: Add a new test suite + [43983bd875f2] + + * test/Makefile.am: Correct the macro name for the test log compiler + [b0c685b83781] + +2020-05-24 Kaz Nishimura + + * libxllmnrd/interface.cpp, libxllmnrd/interface.h, + libxllmnrd/rtnetlink.cpp, libxllmnrd/rtnetlink.h: Move + 'add_interface_address' and 'remove_interface_address' to + 'interface_manager' + [ac7d94719bd5] + + * libxllmnrd/ifaddr.cpp: Modify pre-processor conditionals + [8d992d6b1733] + + * libxllmnrd/interface.cpp, libxllmnrd/interface.h: Add members for + interfaces addresses + [a28605a1436d] + + * libxllmnrd/interface.cpp, libxllmnrd/interface.h: Add a map member + to interfaces + [a83274b113c2] + + * libxllmnrd/interface.cpp, libxllmnrd/interface.h, + libxllmnrd/rtnetlink.cpp, libxllmnrd/rtnetlink.h: Move the operating + system interface to 'rtnetlink_interface_manager' + [2cfcc99e24f9] + + * libxllmnrd/ifaddr.cpp, libxllmnrd/interface.cpp, + libxllmnrd/interface.h, libxllmnrd/rtnetlink.cpp, + libxllmnrd/rtnetlink.h: Rename the interface manager classes + [6ca687fa970f] + + * libxllmnrd/ifaddr.cpp: Include "rtnetlink.h" + [45158e0517c0] + + * libxllmnrd/Makefile.am, libxllmnrd/ifaddr.cpp, libxllmnrd/ifaddr.h, + libxllmnrd/interface.cpp, libxllmnrd/interface.h, + libxllmnrd/rtnetlink.h: Move 'ifaddr_manager' to a new unit + [ffa0f86e0bd3] + + * libxllmnrd/rtnetlink.h: Use 'std::size_t' without the namespace + prefix + [c8c6a6c6c440] + + * libxllmnrd/rtnetlink.cpp, libxllmnrd/rtnetlink.h: Add the 'std' + namespace to standard C++ identifiers + [579cfa5d01dd] + + * azure-pipelines.yml: Remove the '--install' option from the + 'autoreconf' invocation + [4155d568dc09] + + * Merge back release/3 + [ae0afb4c400b] + + * .hgtags: Added tag release/3-alpha.2 for changeset 4e2a9683b6ca + [1ecc6defc21b] + + * azure-pipelines.yml, configure.ac: Change the package version + [e090701b5076] + + * Merge master into release/3 + [4e2a9683b6ca] + + * libxllmnrd/Makefile.am, libxllmnrd/ifaddr.cpp, libxllmnrd/ifaddr.h, + libxllmnrd/rtnetlink.cpp, libxllmnrd/rtnetlink.h: Move + 'rtnetlink_ifaddr_manager' to its own unit + [389a25d9c1c9] + + * configure.ac: Change the order of the output files + [a0dbbc2c2ac8] + + * test/Makefile.am: Correct the 'run-test' target + [1bc8d8bc5947] + + * Makefile.am, libxllmnrd/Makefile.am, lsb/Makefile.am, + src/Makefile.am, test/Makefile.am: Edit comments + [575a54aa6709] + + * test/Makefile.am: Remove the 'test-reports' directory with 'clean- + local' + [3f9c712cdd17] + + * test/Makefile.am: Make the 'run-test' script using 'config.status' + [7005c1894891] + + * test/Makefile.am: Set 'TEST_EXTENSIONS' unconditionally + [58d24629b815] + + * test/Makefile.am: Add an include path + [97066c888b12] + +2020-05-22 Kaz Nishimura + + * libxllmnrd/ifaddr.cpp: Remove compound literals + [ad69f60aa4a9] + + * libxllmnrd/ifaddr.cpp: Modify initialization of the + 'ifaddr_interface' type + [2c02a5e9a6df] + + * src/main.cpp: Add member initializers + [a922f0ba08ee] + + * .vscode/c_cpp_properties.json: Add 'LOCALEDIR' to the defined macros + [36aad6fd0fd4] + + * libxllmnrd/ifaddr.cpp, src/main.cpp, src/responder.cpp: Remove + variable length arrays + [73207a42dde3] + + * libxllmnrd/ifaddr.cpp, src/main.cpp, src/responder.cpp: Remove + designated initializers + [b1f852d7421d] + + * .vscode/c_cpp_properties.json: Set the configuration GCC-specific + [54806ba7f266] + + * .vscode/tasks.json: Remove the 'Rebuild' task from the 'build' group + [2eedc9867803] + +2020-04-16 Kaz Nishimura + + * .gitignore, .hgignore: Update the ignore list + [d52d27f55eed] + + * src/run.sh, src/testifaddr.cpp, src/testmain.cpp: Remove unused + files + [30fb434d67cc] + + * src/Makefile.am: Remove tests from 'src/Makefile' + [d85f8af493b2] + + * test/Makefile.am, test/test_ifaddr.cpp: Copy unit tests to the + 'test' directory + [60ee811ddc1e] + + * test/main.cpp, test/xmlreport.cpp, test/xmlreport.h: Add common + source files for unit tests + [f96df13e55be] + +2020-04-10 Kaz Nishimura + + * .vscode/launch.json: Add the 'launch.json' file for VS Code + [22b577dd21d6] + + * .gitignore, .hgignore: Update the ignore file list + [2ca1b647e187] + + * test/Makefile.am, test/run-test.in: Add a test runner script + [f97f7fd5b2b1] + +2020-04-09 Kaz Nishimura + + * src/main.cpp: Hangle runtime errors in setting locale + [c00f434ea277] + + * configure.ac: Update the bug reporting address + [a21f75275688] + + * configure.ac: Remove the definition of 'PACKAGE_REVISION' + [ed07fe8bd5b3] + + * Makefile.am, configure.ac, test/Makefile.am: Add a new 'test' + directory + [c8123cc96f6d] + + * configure.ac: Use 'AC_CONFIG_MACRO_DIRS' + [e854b536bef7] + + * configure.ac: Remove the redundant use of 'AC_PROG_CC_STDC' and + 'AC_PROG_RANLIB' + [fdab28800b22] + + * acinclude.m4, configure.ac: Remove the 'XX_PROG_CXX_STD11' macro + [7a15472a4d3f] + + * .hgtags: Added tag release/2.1 for changeset c3349e7c9aa5 + [b7b559ad6aca] + +2020-04-07 Kaz Nishimura + + * rocro.yml: Remove the 'rocro.yml' file + [3b6fe105fbc4] + + * .gitignore: Add the '.gitignore' file + [f196a9012ee7] + + * po/xllmnrd.pot: Regenrate the pot file + [22ccc61859ad] + + * Makefile.am: Modify checksum generation + [c9d181379c38] + +2020-03-30 Kaz Nishimura + + * Merge back release/3 + [0d99d7c5b742] + + * .hgtags: Added tag release/3-alpha.1 for changeset 6c957b4c920f + [c703a59b21b0] + + * azure-pipelines.yml, configure.ac: Change the package version + [ca35af1885b8] + + * po/xllmnrd.pot: Merge master for release management + [6c957b4c920f] + + * .vscode/tasks.json: Deconfigure the default build task + [b18d7b1b3f1f] + +2020-03-21 Kaz Nishimura + + * azure-pipelines.yml: Update 'package.distName' + [814e0f9292a3] + + * configure.ac: Change the package version + [2bac8b7af14d] + + * setupkeys.sh: Add comments to the 'setupkeys.sh' script + [1918b94147ac] + + * azure-pipelines.yml: Use the 'upload.sh' script to upload artifacts + [e076094c4511] + + * upload.sh: Generalize the 'upload.sh' script + [19b91621f525] + + * azure-pipelines.yml: Change the 'Publish' stage to 'Release' + [bfa2bd910114] + + * azure-pipelines.yml: Show compiler versions in the Configure step + [fe1a9ad6f00d] + + * azure-pipelines.yml: Rename a step + [0666819a6b49] + + * azure-pipelines.yml: Use new variable 'package.distName' + [d209f3c35e54] + + * azure-pipelines.yml: Remove double asterisks in trigger patterns + [b26ad6dd4c14] + + * azure-pipelines.yml: Remove the Publish job + [246064ccc988] + +2020-03-10 Kaz Nishimura + + * setupkeys.sh: Rename the variable for signing key + [f0a6a1e636f5] + +2020-03-08 Kaz Nishimura + + * azure-pipelines.yml: Use 'workingDirectory' instead of 'cd' in the + scripts + [9680fe2b7f4f] + + * azure-pipelines.yml: Build directly in the source dir + [38208b60de5f] + + * azure-pipelines.yml: Add quotes + [40c515f5d720] + +2020-03-05 Kaz Nishimura + + * azure-pipelines.yml: Add an 'azure-pipelines.yml' file + [d5e05a7c244f] + + * setupkeys.sh: Add the 'setupkeys.sh' script + [dc5e4e57f2a6] + +2019-12-30 Kaz Nishimura + + * bitbucket-pipelines.yml, upload.sh: Make snapshots uploaded to the + repository + [8f9c4da15b9c] + +2019-12-26 Kaz Nishimura + + * bitbucket-pipelines.yml: Modify and rename step test + [bad8773c139d] + +2019-12-14 Kaz Nishimura + + * libxllmnrd/ifaddr.cpp: Correct a message string + [5829df8cf96d] + +2019-12-13 Kaz Nishimura + + * .codeclimate.yml, configure.ac, etc/builder/.dockerignore, + etc/builder/Dockerfile, libxllmnrd/ifaddr.c, src/Makefile.am: Merge + master into feature/c++11 + [cdeecf36750c] + + * m4/cppunit.m4: Merge feature/configure-cppunit (pull request #13) + [cfd6c990247a] + +2019-12-12 Kaz Nishimura + + * gcc/Dockerfile: Update the Dockerfile for builder images + [7af8293ddb41] + + * docker-compose.yml, etc/gcc/.dockerignore, etc/gcc/Dockerfile, + gcc/.dockerignore, gcc/Dockerfile: Update the Docker builder + [43dfca16697b] + + * m4/cppunit.m4: Remove 'cppunit.m4' + [24e6f8a9d434] + + * configure.ac: Modify the check for CppUnit + [b9bd978050ff] + +2019-12-11 Kaz Nishimura + + * Merge feature/vscode-tasks-update + [e1217be1d160] + + * .vscode/tasks.json: Update VSCode tasks + [e793034d964d] + + * .vscode/tasks.json: Specify a 'problemMatcher' for the Build task + [77e798258707] + + * configure.ac: Modify the check for CppUnit existence + [8026f8645135] + +2019-12-09 Kaz Nishimura + + * Merge master + [073b6abbf58d] + + * libxllmnrd/ifaddr.c: Update copyright years + [32512b583859] + +2019-12-08 Kaz Nishimura + + * .vscode/c_cpp_properties.json: Add a newline character at the EOF + [025a90e32259] + + * .vscode/tasks.json: Configure basic tasks for Visual Studio Code + [2220112eff2a] + +2019-12-02 Kaz Nishimura + + * .github/FUNDING.yml: Add 'FUNDING.yml' for GitHub + [43fc94bdab5d] + +2019-11-29 Kaz Nishimura + + * Merge branch feature/pipelines-git (pull request #7) + [23dd2f72bfc7] + + * Merge branch feature/conditional-cppunit (pull request #6) + [82fb45823c76] + +2019-11-30 Kaz Nishimura + + * configure.ac, src/Makefile.am: Skip tests if CppUnit is not + available + [5f8ed0a6bd36] + +2019-11-29 Kaz Nishimura + + * bitbucket-pipelines.yml: Build in a subdirectory + [62545c1f9561] + + * Merge branch feature/pipelines-git (pull request #5) + [692e15293651] + +2019-11-28 Kaz Nishimura + + * bitbucket-pipelines.yml: Run test builds for pull requests + [bd740224bb89] + + * libxllmnrd/ifaddr.c: Include + [d4c83598ce03] + + * m4/cppunit.m4: Add 'cppunit.m4' + [ad14fd8cd92f] + + * bitbucket-pipelines.yml: Modify pipelines for Git + [9139852690a6] + +2019-11-26 Kaz Nishimura + + * build-aux/compile, build-aux/config.guess, build-aux/config.sub, + build-aux/depcomp, build-aux/install-sh, build-aux/missing, build- + aux/test-driver: Refresh build scripts + [a791200d7ea4] + + * .vscode/settings.json: Modify the 'files.exclude' entries + [ddab65cc876b] + + * .hgeol, .hgignore: Modify Mercurial dot files + [88b15e7737c2] + +2018-09-12 Kaz Nishimura + + * docker-compose.yml: Changed the default command + [194ba9cd74cd] + + * etc/gcc/Dockerfile: Upgraded to GCC 8 + [e9f625488d0b] + +2018-07-08 Kaz Nishimura + + * docker-compose.yml: Modified to run commands in subdirectory 'build' + [3fa070a0fd4c] + + * docker-compose.yml: Changed the service name + [1a7cbf858752] + + * bitbucket-pipelines.yml, docker-compose.yml, + etc/builder/.dockerignore, etc/builder/Dockerfile, + etc/gcc/.dockerignore, etc/gcc/Dockerfile: Changed the image tag + [ea353a784723] + + * docker-compose.yml: Changed the Compose file version to '2.1' + [da4c142dd5fd] + + * bitbucket-pipelines.yml: Passed '-i' to 'autoreconf' + [6b2e63ac2617] + + * bitbucket-pipelines.yml: Added comments + [9234eca6809a] + +2018-05-24 Kaz Nishimura + + * .vscode/c_cpp_properties.json: Add VSCode IntelliSense settings + [c2c2a2f60dc5] + + * CONTRIBUTING.md: Edit the guidelines + [ebc2d8c243de] + +2018-05-23 Kaz Nishimura + + * CONTRIBUTING.md: Update guidelines + [5c004164ec63] + +2018-05-12 Kaz Nishimura + + * .hgignore: Edit the ignore list + [351720325b03] + +2018-04-12 Kaz Nishimura + + * CONTRIBUTING.md: Add guidelines + [e2d0e2155c57] + + * .vscode/settings.json: Update files to ignore + [e5cef1b0adb5] + +2018-03-16 Kaz Nishimura + + * docker-compose.yml: Update the file header. + [473b94eadd60] + + * docker-compose.yml: Specify the 'latest' tag. + [d4e9ba55a8be] + + * .hgignore: Update the '.hgignore' file with full regexp patterns. + [5878b5256c03] + + * po/xllmnrd.pot: Add a pot file. + [e325559d1e81] + + * .codeclimate.yml: Remove the Code Climate configuration. + [b7d52c08ac98] + +2018-02-09 Kaz Nishimura + + * README.md: Update documentation. + [6cba8c069878] + + * README.md: Close issue #60. + [6e0f80b941ed] + +2018-02-04 Kaz Nishimura + + * libxllmnrd/ifaddr.c: Correct spelling. + [cc570851b279] + +2018-01-31 Kaz Nishimura + + * rocro.yml: Add a 'rocro.yml' file. + [ded7bb02bf17] + +2017-12-24 Kaz Nishimura + + * docker-compose.yml: Change network mode. + [d74fecf2129f] + +2017-12-23 Kaz Nishimura + + * bitbucket-pipelines.yml: Reformat the permission notice. + [b7faae06f3d6] + + * configure.ac, libxllmnrd/Makefile.am, libxllmnrd/ifaddr.c, + libxllmnrd/ifaddr.cpp, libxllmnrd/ifaddr.h, libxllmnrd/posix.cpp, + libxllmnrd/posix.h, po/ja.po, src/Makefile.am, src/main.c, + src/main.cpp, src/responder.c, src/responder.cpp: Merge bookmark + master. + [8cf1d86f0c92] + + * src/Makefile.am, src/testmain.cpp: Change the test reports + destination. + [5c4098e4cc9a] + + * bitbucket-pipelines.yml: Cease running 'apt-get'. + [78e149d5f4ec] + + * bitbucket-pipelines.yml: Run 'make check'. + [42e163b411df] + + * bitbucket-pipelines.yml: Change the all bookmarks pipeline to + default. + [4736f72de59e] + +2017-12-22 Kaz Nishimura + + * .vscode/settings.json: Add settings for Visual Studio Code. + [259aec87340d] + + * etc/builder/.dockerignore: Add a .dockerignore file. + [bdffb002f7af] + + * README.md: Change link schemes to 'https'. + [e4481a46fc5e] + + * README.md: Update README text. + [060a26ede2c2] + + * README.md: Add badges to README. + [bb271c0dae52] + +2017-07-19 Kaz Nishimura + + * Makefile.am, configure.ac, libxllmnrd/Makefile.am, + libxllmnrd/ascii.h, libxllmnrd/ifaddr.c, libxllmnrd/ifaddr.h, + src/Makefile.am, src/ascii.h, src/ifaddr.c, src/ifaddr.h: Add the + new 'libxllmnrd' directory and move the local library there. + [e9c6f8e25052] + +2017-07-10 Kaz Nishimura + + * Merge with master. + [dc8d3ece304b] + + * etc/builder/Dockerfile: Revert indentation changes. + [31fffe3e0bd0] + +2017-07-08 Kaz Nishimura + + * etc/builder/Dockerfile: Install 'libcppunit-dev' in the builder + image. + [9f82c6ac449e] + + * Makefile.am, README.md: Include 'README.md' in the package, closing + issue #59. + [51014b697e4a] + +2017-06-28 Kaz Nishimura + + * README, README.md: Update the URLs in the README files, closing + issue #58. + [4066b5b11845] + +2017-06-26 Kaz Nishimura + + * bitbucket-pipelines.yml: Change the Docker image to use on Bitbucket + Pipelines. + [ccb439679b1c] + +2017-06-21 Kaz Nishimura + + * docker-compose.yml, etc/builder/Dockerfile: Add files for Docker + builds. + [0503941d715f] + +2017-06-16 Kaz Nishimura + + * bitbucket-pipelines.yml: Upgrade GCC for Bitbucket Pipelines. + [d9c0b8d70279] + +2017-06-13 Kaz Nishimura + + * m4/extern-inline.m4: Update extern-inline.m4 from gettext. + [3e310d80033b] + +2017-05-13 Kaz Nishimura (gnulib-tool) + + * Makefile.am, build-aux/install-sh, build-aux/snippet/_Noreturn.h, + build-aux/snippet/arg-nonnull.h, build-aux/snippet/c++defs.h, build- + aux/snippet/warn-on-use.h, libgnu/Makefile.am, libgnu/dummy.c, + libgnu/getopt.c, libgnu/getopt.in.h, libgnu/getopt1.c, + libgnu/getopt_int.h, libgnu/gettext.h, libgnu/m4/00gnulib.m4, + libgnu/m4/extensions.m4, libgnu/m4/getopt.m4, libgnu/m4/gnulib- + cache.m4, libgnu/m4/gnulib-common.m4, libgnu/m4/gnulib-comp.m4, + libgnu/m4/include_next.m4, libgnu/m4/nocrash.m4, + libgnu/m4/ssize_t.m4, libgnu/m4/stddef_h.m4, libgnu/m4/stdlib_h.m4, + libgnu/m4/sysexits.m4, libgnu/m4/unistd_h.m4, libgnu/m4/warn-on- + use.m4, libgnu/m4/wchar_t.m4, libgnu/snippet/_Noreturn.h, + libgnu/snippet/arg-nonnull.h, libgnu/snippet/c++defs.h, + libgnu/snippet/warn-on-use.h, libgnu/stddef.in.h, + libgnu/stdlib.in.h, libgnu/sys_types.in.h, libgnu/sysexits.in.h, + libgnu/unistd.c, libgnu/unistd.in.h, m4/00gnulib.m4, m4/absolute- + header.m4, m4/extensions.m4, m4/extern-inline.m4, m4/getopt.m4, m4 + /gnulib-cache.m4, m4/gnulib-common.m4, m4/gnulib-comp.m4, m4/gnulib- + tool.m4, m4/include_next.m4, m4/nocrash.m4, m4/off_t.m4, + m4/ssize_t.m4, m4/stddef_h.m4, m4/stdlib_h.m4, m4/sys_types_h.m4, + m4/sysexits.m4, m4/unistd_h.m4, m4/warn-on-use.m4: Update the gnulib + modules. + [0efbe1eab800] + +2017-05-11 Kaz Nishimura + + * configure.ac: Update the URLs. + [9dd39a1e7a05] + +2017-04-29 Kaz Nishimura + + * bitbucket-pipelines.yml: Modify the pipelines. + [4b838d1bc3d6] + +2017-01-06 Kaz Nishimura + + * .codeclimate.yml: Add the Code Climate configuration + [fed937c6ebd6] + +2016-12-19 Kaz Nishimura + + * .hgignore: Update file '.hgignore'. + [04371073aa9d] + +2016-11-24 Kaz Nishimura + + * bitbucket-pipelines.yml: Changed to run 'make install'. + [4b7740e9e1ad] + +2016-11-23 Kaz Nishimura + + * configure.ac, src/ifaddr.c, src/main.c, src/responder.c: Merge. + [885c4de214d3] + + * Close this branch. + [4208bc5ec352] + + * README, README.md: Updated the package name in documents (see issue + #56). + [dd6e24e1fbde] + + * README, README.md, configure.ac: Updated the package URL (to close + issue #57). + [2a4f56ba0b03] + + * configure.ac: Changed the package name to all-caps (to close issue + #56). + [762ea818226f] + +2016-11-03 Kaz Nishimura + + * bitbucket-pipelines.yml: Fixed the Bitbucket Pipelines + configuration. + [9450fd6e55f1] + + * bitbucket-pipelines.yml: Fixed the Bitbucket Pipelines + configuration. + [758d4b1681e3] + + * bitbucket-pipelines.yml: Fixed the Bitbucket Pipelines + configuration. + [d9ca1d3f7f11] + + * bitbucket-pipelines.yml: Fixed the Bitbucket Pipelines + configuration. + [36a45e7701e2] + + * bitbucket-pipelines.yml: Fixed the Bitbucket Pipelines + configuration. + [1dd1962df7f3] + + * bitbucket-pipelines.yml: Added the Bitbucket Pipelines configuration + file. + [8fce801f527d] + +2015-09-25 Kaz Nishimura + + * src/Makefile.am: Merge with default. + [f95075e7fba4] + + * Makefile.am: Updated the execution of pgpsign. + [66229b0ea5cb] + +2015-07-21 Kaz Nishimura + + * Close branch feature/finer-tests + [497bc0ec956a] + + * Merge branch feature/finer-tests (pull request #16) + [2494be3e1d1e] + +2015-07-17 Kaz Nishimura + + * Changed not to run 'make check' by default. + [09a0d19fd7d9] + + * src/Makefile.am, src/testmain.cpp: Changed the XML output file name + from unit tests. + [6a150951ba00] + + * src/testmain.cpp: Changed the unit test driver to make an XML + output. + [2aa481d29cd6] + + * src/Makefile.am, src/run.sh: Modified unit tests to be run + separately. + [d8e97deb7a85] + +2015-07-11 Kaz Nishimura + + * configure.ac, po/xllmnrd.pot: Merge with default. + [417a34442951] + + * po/ja.po: Updated 'ja.po'. + [3837a15f6901] + + * po/xllmnrd.pot: Removed the pot file from version control. + [f2da90918c12] + + * po/Makevars: Updated the 'Makevars' file. + [59739f96e79f] + + * po/Makevars.template, po/Rules-quot: Added more gettext files. + [76138c538d12] + + * po/remove-potcdate.sin: Added po/remove-potcdate.sin. + [f9d3b424e7ec] + + * po/boldquot.sed, po/en@boldquot.header, po/en@quot.header, po + /insert-header.sin, po/quot.sed: Added more gettext files. + [fe434a43f0ba] + + * configure.ac, m4/codeset.m4, m4/fcntl-o.m4, m4/gettext.m4, + m4/glibc2.m4, m4/glibc21.m4, m4/iconv.m4, m4/intdiv0.m4, m4/intl.m4, + m4/intlmacosx.m4, m4/intmax.m4, m4/inttypes-pri.m4, + m4/inttypes_h.m4, m4/lcmessage.m4, m4/lib-ld.m4, m4/lib-link.m4, m4 + /lib-prefix.m4, m4/lock.m4, m4/longlong.m4, m4/nls.m4, m4/po.m4, m4 + /printf-posix.m4, m4/progtest.m4, m4/size_max.m4, m4/stdint_h.m4, + m4/threadlib.m4, m4/visibility.m4, m4/wchar_t.m4, m4/wint_t.m4, + m4/xsize.m4, po/Makefile.in.in: Updated the gettext-related files. + [ddb1309fc40e] + + * build-aux/config.rpath: Updated the 'config.rpath' file. + [abca06da8073] + + * .hgignore, m4/codeset.m4, m4/fcntl-o.m4, m4/gettext.m4, + m4/glibc2.m4, m4/glibc21.m4, m4/iconv.m4, m4/intdiv0.m4, m4/intl.m4, + m4/intldir.m4, m4/intlmacosx.m4, m4/intmax.m4, m4/inttypes-pri.m4, + m4/inttypes_h.m4, m4/lcmessage.m4, m4/lib-ld.m4, m4/lib-link.m4, m4 + /lib-prefix.m4, m4/lock.m4, m4/longlong.m4, m4/nls.m4, m4/po.m4, m4 + /printf-posix.m4, m4/progtest.m4, m4/size_max.m4, m4/stdint_h.m4, + m4/threadlib.m4, m4/uintmax_t.m4, m4/visibility.m4, m4/wchar_t.m4, + m4/wint_t.m4, m4/xsize.m4: Added Autoconf macro files for gettext. + [586ca27f474d] + + * po/Makefile.in.in: Added po/Makefile.in.in. + [129040b741d2] + + * Made the 'configure' target depend on 'force'. + [8501a4035f91] + + * ABOUT-NLS: Added the 'ABOUT-NLS' file. + [3ecff6391407] + + * .hgignore, build-aux/compile, build-aux/config.guess, build- + aux/config.rpath, build-aux/config.sub, build-aux/depcomp, build-aux + /install-sh, build-aux/missing, build-aux/test-driver: Added files + to build-aux. + [b214971d7644] + + * INSTALL: Updated the 'INSTALL' file. + [4e4c63012c33] + + * Removed the '--install' option from autoreconf invocation. + [236e4078a647] + +2015-04-09 Kaz Nishimura + + * Merge with default. + [09bfe86ac6b2] + +2015-04-07 Kaz Nishimura + + * Makefile.am: Replaced sha1sum with shasum. + [7cf51f479446] + +2015-04-06 Kaz Nishimura + + * src/ifaddr.cpp, src/ifaddr.h: Added a new member function to + rtnetlink_ifaddr_manager. + [787be81c4713] + + * src/ifaddr.cpp, src/ifaddr.h: Added a new member function to + rtnetlink_ifaddr_manager. + [af0204cf7f44] + + * src/ifaddr.cpp, src/ifaddr.h: Renamed some members of + rtnetlink_ifaddr_manager. + [de013a20cf37] + + * src/ifaddr.cpp, src/ifaddr.h: Added a new member function to + rtnetlink_ifaddr_manager. + [b0248aa826f5] + + * ABOUT-NLS, configure.ac, src/Makefile.am, src/testifaddr.cpp, + test/Makefile.am, test/testifaddr.cpp, test/testmain.cpp: Merge with + default. + [205646f5d471] + + * Makefile.am, configure.ac, src/Makefile.am, src/testifaddr.cpp, + src/testmain.cpp, test/Makefile.am, test/testifaddr.cpp, + test/testmain.cpp: Moved the test program to src and removed + subdirectory test. + [244f8f230c32] + + * ABOUT-NLS: Excluded ABOUT-NLS from version control. + [7d67804369c3] + + * src/ifaddr.cpp, src/ifaddr.h: Added new members to + rtnetlink_ifaddr_manager. + [f4f207464bf2] + + * src/ifaddr.cpp, src/ifaddr.h: Modified the C++ version not to use a + signal to unblock blocking system calls. + [572d58197da6] + + * src/ifaddr.cpp: Disabled unused code if IFADDR_CPLUSPLUS is defined. + [78ba8238944d] + + * src/ifaddr.cpp: Revived some of the original C code. + [c56d7fe0ed5e] + + * src/ifaddr.cpp, src/ifaddr.h: Added class rtnetlink_ifaddr_manager + and moved RTNETLINK-related code into it. + [af7318926846] + +2015-04-05 Kaz Nishimura + + * src/ifaddr.cpp, src/ifaddr.h: Added a new member function to + ifaddr_manager. + [f865233dae33] + + * src/ifaddr.cpp: Fixed a compile error when IFADDR_CPLUSPLUS is non- + zero. + [001bf2460aa4] + + * src/posix.cpp, src/posix.h: Added a new member function to posix. + [027c4692ae92] + + * src/ifaddr.cpp: Added conditional code for backward-compatibility. + [a938168d1111] + + * src/ifaddr.cpp: Used generic_category instead of system_category to + throw POSIX errors. + [a87f7c2a9886] + +2015-04-04 Kaz Nishimura + + * src/ifaddr.cpp, src/ifaddr.h: Added new member functions to + ifaddr_manager. + [61e22da009b0] + + * src/ifaddr.h: Updated a comment. + [2ac8498b67fc] + + * src/ifaddr.cpp, src/ifaddr.h: Updated the copyright years. + [8f2a91cb3727] + +2015-04-03 Kaz Nishimura + + * Modified to make check by default. + [4f375171b4f3] + + * src/ifaddr.h: Added a map to the interface addresses to + ifaddr_manager. + [28b07bdb8640] + + * Merge with default. + [6b6d6465460a] + + * Updated build rules. + [bd4305129dfb] + + * src/ifaddr.cpp, src/ifaddr.h: Added a new member function to + ifaddr_manager. + [1a84335fba2f] + + * src/ifaddr.cpp, src/ifaddr.h, src/responder.cpp, + test/testifaddr.cpp: Moved type definitions into namespace xllmnrd. + [9dbdbff7235f] + + * src/ifaddr.cpp, src/ifaddr.h: Added implementation to + ifaddr_manager. + [818f277f0cfa] + + * po/ja.po, src/main.cpp: Merge with default. + [a4eb3733309c] + + * src/ifaddr.cpp: Replaced the initialized flag with a pointer to the + static manager object. + [3b03224fdd11] + + * src/ifaddr.h: Renamed if_manager to ifaddr_manager. + [0d92b55600cc] + + * src/ifaddr.h: Removed #if/#endif directives for C in ifaddr. + [0f13faaba864] + + * configure.ac, src/Makefile.am, src/responder.c, src/responder.cpp: + Changed responder to C++. + [8fddbd9ef9a4] + +2015-03-21 Kaz Nishimura + + * src/ifaddr.h: Added new class if_manager. + [013c35026879] + + * src/Makefile.am, src/posix.cpp, src/posix.h: Added new unit posix. + [61c0c864b9e5] + + * src/Makefile.am, src/ifaddr.c, src/ifaddr.cpp: Changed ifaddr to + C++. + [f30e46ecba35] + +2015-03-18 Kaz Nishimura + + * test/testifaddr.cpp: Modified the inclusion of the ifaddr header in + the test file. + [1965d89b8b9d] + + * po/xllmnrd.pot: Updated the translation template. + [c32db5a6b9c4] + + * src/main.c: Modified the inclusion of the gettext header. + [08b59ce4a299] + + * src/main.c: Changed the inclusion order of headers. + [35ef84b08890] + + * src/responder.h: Backed out changeset f2d9118d626e. + [678fe743e762] + + * src/ifaddr.h, src/main.cpp: Specified "C" linkage in the ifaddr + header. + [c8e96428adc9] + + * src/responder.h: Specified "C" linkage when including ifaddr from + responder temporarily. + [f2d9118d626e] + + * src/main.cpp, src/responder.h: Specified "C" linkage in the + responder header. + [8f7d7f61b460] + + * build-aux/snippet/arg-nonnull.h, build-aux/snippet/c++defs.h, build- + aux/snippet/warn-on-use.h, libgnu/m4/absolute-header.m4, libgnu/m4 + /extern-inline.m4, libgnu/m4/gnulib-tool.m4, libgnu/m4/off_t.m4, + libgnu/m4/sys_types_h.m4, libgnu/sys_types.in.h, libgnu/unistd.c, + src/main.cpp: Merge with default. + [17502da9d01d] + +2015-03-16 Kaz Nishimura + + * src/main.c: Removed the macro definitions for exit status. + [5ff572c88893] + + * build-aux/snippet/arg-nonnull.h, build-aux/snippet/c++defs.h, build- + aux/snippet/warn-on-use.h, configure.ac, libgnu/Makefile.am, + libgnu/dummy.c, libgnu/getopt.c, libgnu/getopt.in.h, + libgnu/getopt1.c, libgnu/getopt_int.h, libgnu/gettext.h, + libgnu/m4/00gnulib.m4, libgnu/m4/absolute-header.m4, + libgnu/m4/extensions.m4, libgnu/m4/extern-inline.m4, + libgnu/m4/getopt.m4, libgnu/m4/gnulib-cache.m4, libgnu/m4/gnulib- + common.m4, libgnu/m4/gnulib-comp.m4, libgnu/m4/gnulib-tool.m4, + libgnu/m4/include_next.m4, libgnu/m4/nocrash.m4, libgnu/m4/off_t.m4, + libgnu/m4/ssize_t.m4, libgnu/m4/stddef_h.m4, libgnu/m4/stdlib_h.m4, + libgnu/m4/sys_types_h.m4, libgnu/m4/sysexits.m4, + libgnu/m4/unistd_h.m4, libgnu/m4/warn-on-use.m4, + libgnu/m4/wchar_t.m4, libgnu/snippet/_Noreturn.h, libgnu/snippet + /arg-nonnull.h, libgnu/snippet/c++defs.h, libgnu/snippet/warn-on- + use.h, libgnu/stddef.in.h, libgnu/stdlib.in.h, + libgnu/sys_types.in.h, libgnu/sysexits.in.h, libgnu/unistd.c, + libgnu/unistd.in.h, src/main.c: Imported sysexits.h from Gnulib. + [362dc18cae17] + + * src/main.cpp: Changed the copyright years. + [cd975d2a0ce7] + + * configure.ac: Changed the file to check for the source directory. + [9c9333d3cebc] + + * po/POTFILES.in: Changed the file name for translations. + [b248995bf66e] + + * src/main.cpp: Used C++ versions of headers and functions if + available. + [fffd9dc9b006] + + * src/Makefile.am, src/main.c, src/main.cpp: Changed the main function + to C++. + [a2ac63ef63b9] + +2014-08-22 Kaz Nishimura + + * po/xllmnrd.pot: Updated 'xllmnrd.pot'. + [5f4d54aa3b15] + +2014-08-04 Kaz Nishimura + + * configure.ac: Omitted 'AC_C_INLINE'. + [9a7bf278f33e] + + * configure.ac: Updated the project home page URL. + [29067250f593] + + * .hgignore: Changed the order of ignore patterns. + [ba3152ec7679] + + * build-aux/snippet/arg-nonnull.h, build-aux/snippet/c++defs.h, build- + aux/snippet/warn-on-use.h, libgnu/Makefile.am, libgnu/m4/gnulib- + cache.m4, libgnu/snippet/arg-nonnull.h, libgnu/snippet/c++defs.h, + libgnu/snippet/warn-on-use.h: Changed the aux directory for Gnulib + back to the default. + [1e63450af4e2] + + * libgnu/dummy.c, src/gettext.h: Merge feature/gnulib-update into + default (pull request #15). + [d1ec35613c4a] + + * configure.ac: Added 'AC_PROG_RANLIB'. + [515f3b3af37b] + + * .hgignore: Changes to list files in 'build-aux' explicitly. + [fff7cb101e3c] + + * README.md: Added a horizontal rule. + [73b459db3e11] + + * README.md: Edited text. + [527f1e414f05] + + * libgnu/Makefile.am, libgnu/m4/gnulib-cache.m4, src/Makefile.am, + src/gettext.h: Imported 'gettext.h' from Gnulib. + [af22c415e9ce] + +2014-08-04 Kaz Nishimura (gnulib-tool) + + * libgnu/Makefile.am, libgnu/dummy.c, libgnu/getopt.c, + libgnu/getopt.in.h, libgnu/getopt1.c, libgnu/getopt_int.h, + libgnu/gettext.h, libgnu/m4/00gnulib.m4, libgnu/m4/absolute- + header.m4, libgnu/m4/extensions.m4, libgnu/m4/extern-inline.m4, + libgnu/m4/getopt.m4, libgnu/m4/gnulib-cache.m4, libgnu/m4/gnulib- + common.m4, libgnu/m4/gnulib-comp.m4, libgnu/m4/gnulib-tool.m4, + libgnu/m4/include_next.m4, libgnu/m4/nocrash.m4, libgnu/m4/off_t.m4, + libgnu/m4/ssize_t.m4, libgnu/m4/stddef_h.m4, + libgnu/m4/sys_types_h.m4, libgnu/m4/unistd_h.m4, libgnu/m4/warn-on- + use.m4, libgnu/m4/wchar_t.m4, libgnu/snippet/arg-nonnull.h, + libgnu/snippet/c++defs.h, libgnu/snippet/warn-on-use.h, + libgnu/stddef.in.h, libgnu/sys_types.in.h, libgnu/unistd.c, + libgnu/unistd.in.h: Updated the source files from Gnulib. + [a803ea8c7d38] + +2014-08-02 Kaz Nishimura + + * Added 'srcdir' for the source files. + [565e9605b143] + + * test/Makefile.am: Changed to build the 'runtest' driver with the new + local library. + [8c7747a60c72] + + * src/Makefile.am: Changed to make a local library for source files + but 'main.c'. + [12614a4bbac6] + +2014-07-31 Kaz Nishimura + + * configure.ac: Updated the version number for the next release. + [298264ed54e9] + + * Modified build rules to test basic installation. + [0e3c1dd979a0] + 2014-07-25 Kaz Nishimura - * po/ja.po: - Updated the po file for Japanese. - [551af7db1892] [tip] + * README.md: Corrected marking down. + [a37da29d8aad] - * po/Makevars, po/xllmnrd.pot: - Changed 'MSGID_BUGS_ADDRESS' and regenerated the pot file. + * README.md: Removed an extra line. + [10d34467c41f] + + * Merge with release. + [ff534f17517a] + + * Changed the build rule. + [f91078c77de3] + + * .hgtags: Added tag release/2.0 for changeset 31e1a7cd0dfd + [e2a829a43918] + + * ChangeLog: Updated the 'ChangeLog' file. + [31e1a7cd0dfd] + + * po/ja.po: Updated the po file for Japanese. + [551af7db1892] + + * po/Makevars, po/xllmnrd.pot: Changed 'MSGID_BUGS_ADDRESS' and + regenerated the pot file. [396ef711efc0] - * po/xllmnrd.pot: - Updated the pot file. + * Merge default into release. + [024ca1ea2037] + + * Added minor substitution in ChangeLog generation. + [ac0bc1a6c5ce] + + * Excluded files that are not distributed from ChangeLog. + [1fdc4f46025e] + + * Removed an extra semicolon. + [226860de41a0] + + * Added a rule to update the ChangeLog file. + [f92ca3ef4fdb] + + * po/xllmnrd.pot: Updated the pot file. [e48fda81b724] - * NEWS: - Updated the NEWS file for version 2.0 (see issue #52). + * NEWS: Updated the NEWS file for version 2.0 (see issue #52). [b790dafe1dfb] - * README: - Updated the README text to close issue #48. + * README.md: Updated the Markdown version, too. + [f08f28aaca75] + + * README: Updated the README text to close issue #48. [0af7c21e5357] 2014-07-09 Kaz Nishimura - * configure.ac: - Changed the bug reporting address. + * configure.ac: Changed the bug reporting address. [ba74c5110296] - * configure.ac: - Changed the version number to simplify version numbering. + * configure.ac: Changed the version number to simplify version + numbering. [c774b0d4c460] 2014-07-03 Kaz Nishimura - * src/responder.c: - Added code to disable packet fragmentation to fix issue #49. + * Merge feature/responder-ipv6-dontfrag into default (pull request + #14). + [ac32fedfd688] + + * src/responder.c: Added code to disable packet fragmentation to fix + issue #49. [62ba26aa013d] 2014-07-01 Kaz Nishimura - * test/testifaddr.cpp: - Corrected tests for ifaddr_lookup_v6() to fix issue #50. + * test/testifaddr.cpp: Corrected tests for ifaddr_lookup_v6() to fix + issue #50. [8315667d8a51] 2014-06-30 Kaz Nishimura - * configure.ac: - Moved gl_EARLY before XX_PROG_CXX_STD11 to suppress a false warning. + * Removed default values for CC and CXX. + [f03fd4f468d5] + + * configure.ac: Moved gl_EARLY before XX_PROG_CXX_STD11 to suppress a + false warning. [e732cbef4748] +2014-06-27 Kaz Nishimura + + * Merged in feature/testifaddr-split (pull request #13): split tests + for ifaddr into two test fixtures. + [d9d6d3069ea0] + 2014-06-26 Kaz Nishimura - * test/testifaddr.cpp: - Modified comment text. + * test/testifaddr.cpp: Modified comment text. [fb6161431bac] - * test/testifaddr.cpp: - Split tests for ifaddr into two test fixtures. + * test/testifaddr.cpp: Split tests for ifaddr into two test fixtures. [28ab331d4845] 2014-06-25 Kaz Nishimura - * acinclude.m4: - Rewrote configure tests for C++11 without 'AC_EGREP_CPP'. + * acinclude.m4: Rewrote configure tests for C++11 without + 'AC_EGREP_CPP'. [087717018c48] +2014-06-24 Kaz Nishimura + + * Changed the rule again to retain tests. + [e463aac6a635] + + * Changed the default rule not to make a binary image. + [7d7a5b6d381f] + 2014-06-22 Kaz Nishimura - * src/ifaddr.c: - Modified a parameter to suppress an error on CLang. + * src/ifaddr.c: Modified a parameter to suppress an error on CLang. [58d616e74573] - * src/responder.c, src/responder.h, test/testifaddr.cpp: - Updated file header comments. + * src/responder.c, src/responder.h, test/testifaddr.cpp: Updated file + header comments. [1812244e3f3c] + * README.md: Recommit a file. + [f94d8a717bee] + +2014-06-21 Kaz Nishimura + + * Merge in feature/ifaddr-v6 (pull request #12) to close issue #22. + [df362bbea699] + 2014-06-18 Kaz Nishimura - * src/ifaddr.c, src/ifaddr.h: - Modified comments and inserted a missing blank line. + * README.md: README.md edited online with Bitbucket + [cc3ec78389e1] + + * src/ifaddr.c, src/ifaddr.h: Modified comments and inserted a missing + blank line. [4d79570b604d] - * src/responder.c: - Modified to return all the IPv6 addresses in a response packet (see - issue #22). + * src/responder.c: Modified to return all the IPv6 addresses in a + response packet (see issue #22). [44944d92cd90] 2014-03-24 Kaz Nishimura - * acinclude.m4: - Modified configure check messages. + * acinclude.m4: Modified configure check messages. [8696450186be] - * acinclude.m4: - Added a missing comma in an autoconf macro. + * acinclude.m4: Added a missing comma in an autoconf macro. [db6cc72dcf5e] - * acinclude.m4, configure.ac: - Modified the configure macro to enable C++11 on recent GCC versions, - closing issue #17. + * Merge with default. + [6642f501dd8b] + + * Merge feature/configure-c++11 into default. + [77736d3b4494] + + * acinclude.m4, configure.ac: Modified the configure macro to enable + C++11 on recent GCC versions, closing issue #17. [737e577cab56] - * src/ifaddr.c: - Removed a test for link-local addresses (see issue #22). + * src/ifaddr.c: Removed a test for link-local addresses (see issue + #22). [b2e090f53676] - * src/ifaddr.c: - Changed a condition to check an interface address. + * src/ifaddr.c: Changed a condition to check an interface address. [77699c5384e0] 2014-03-23 Kaz Nishimura - * configure.ac: - Added a check for C++11. + * configure.ac: Added a check for C++11. [cbe0cf665142] - * acinclude.m4: - Created a configure macro to test C++11. + * acinclude.m4: Created a configure macro to test C++11. [a6e222483fb0] 2014-03-08 Kaz Nishimura - * test/testifaddr.cpp: - Corrected the failed tests. + * test/testifaddr.cpp: Corrected the failed tests. [613a138ce598] 2014-03-06 Kaz Nishimura - * src/responder.c: - Modified the calling function. + * src/responder.c: Modified the calling function. [f0af64f167b2] - * src/ifaddr.c, src/ifaddr.h: - Renamed and changed 'ifaddr_lookup' so that it can return multiple - addresses (see issue #22). + * src/ifaddr.c, src/ifaddr.h: Renamed and changed 'ifaddr_lookup' so + that it can return multiple addresses [c18e5a008380] 2014-03-02 Kaz Nishimura - * src/ifaddr.c: - Changed the member for IPv6 addresses in 'struct ifaddr_interface' - to an array pointer (see issue #22). + * src/ifaddr.c: Changed the member for IPv6 addresses in 'struct + ifaddr_interface' to an array [39d6a4a0f911] 2014-03-02 xgettext - * po/ja.po, po/xllmnrd.pot: - Updated the translation files. + * po/ja.po, po/xllmnrd.pot: Updated the translation files. [0e5f995a641d] 2014-03-02 Kaz Nishimura - * src/ifaddr.c: - Modified comments. + * src/ifaddr.c: Modified comments. [414ea3baecdd] + * src/ifaddr.c: Merge with default. + [c0f0f70bead9] + +2014-02-19 Kaz Nishimura + + * README.md: Modified the repository description text. + [f558c33ad070] + 2014-02-18 Kaz Nishimura - * AUTHORS: - Replaced the URL with a real email address. + * AUTHORS: Replaced the URL with a real email address. [2957188825d6] - * src/ifaddr.c: - Modified a previous change for the workaround case. + * src/ifaddr.c: Modified a previous change for the workaround case. [cfab03aff80b] * src/ifaddr.c, src/main.c, src/responder.c, test/testifaddr.cpp, - test/testmain.cpp: - Do not define '_GNU_SOURCE' if not necessary. + test/testmain.cpp: Do not define '_GNU_SOURCE' if not necessary. [ce62b1f51d58] - * lsb/xllmnrd.in: - Added the long Description to the sample init script to close issue - #44. + * lsb/xllmnrd.in: Added the long Description to the sample init script + to close issue #44. [bac6420078f7] - * configure.ac: - Omitted 'AC_FUNC_MALLOC' and 'AC_FUNC_REALLOC' to fix issue #43. - They are not actually needed. + * configure.ac: Omitted 'AC_FUNC_MALLOC' and 'AC_FUNC_REALLOC' to fix + issue #43. They are not [ae19876611ad] - * configure.ac: - Modified a macro description. + * configure.ac: Modified a macro description. [354e39e02359] 2014-02-18 xgettext - * po/ja.po, po/xllmnrd.pot: - Updated the translation files. + * po/ja.po, po/xllmnrd.pot: Updated the translation files. [4921146dd2c2] +2014-02-18 Kaz Nishimura + + * configure.ac: Merge feature/gnulib-getopt-gnu into default. + [5efc9f166d90] + 2014-02-18 gnulib-tool * libgnu/snippet/arg-nonnull.h, libgnu/snippet/c++defs.h, - libgnu/snippet/warn-on-use.h: - Imported extra files from GNU gnulib. + libgnu/snippet/warn-on-use.h: Imported extra files from GNU gnulib. [a35e713ef344] 2014-02-18 Kaz Nishimura - * libgnu/Makefile.am, libgnu/m4/gnulib-cache.m4: - Moved the snippet location. + * libgnu/Makefile.am, libgnu/m4/gnulib-cache.m4: Moved the snippet + location. [d1f6bb6ce4a2] 2014-02-18 gnulib-tool @@ -209,653 +1614,717 @@ /gnulib-comp.m4, libgnu/m4/gnulib-tool.m4, libgnu/m4/include_next.m4, libgnu/m4/nocrash.m4, libgnu/m4/ssize_t.m4, libgnu/m4/stddef_h.m4, libgnu/m4/unistd_h.m4, - libgnu/m4/warn-on-use.m4, libgnu/m4/wchar_t.m4: - Imported m4 files from GNU gnulib. + libgnu/m4/warn-on-use.m4, libgnu/m4/wchar_t.m4: Imported m4 files + from GNU gnulib. [5791e15b4cc5] 2014-02-18 Kaz Nishimura - * Makefile.am, libgnu/Makefile.am: - Moved the location for the m4 files from GNU gnulib. + * .hgignore: Modified the ignore patterns. + [690b88fc1b4e] + + * Makefile.am, libgnu/Makefile.am: Moved the location for the m4 files + from GNU gnulib. [8acc015f8910] - * configure.ac, src/Makefile.am, src/main.c: - Removed the configure check for getopt.h assuming one from GNU - gnulib. + * configure.ac, src/Makefile.am, src/main.c: Removed the configure + check for getopt.h assuming one from GNU gnulib. [ebe44e9ea66d] - * Makefile.am, configure.ac, src/Makefile.am: - Added libgnu in the build process. + * Makefile.am, configure.ac, src/Makefile.am: Added libgnu in the + build process. [6d2e3940ae7f] 2014-02-18 gnulib-tool * libgnu/Makefile.am, libgnu/dummy.c, libgnu/getopt.c, libgnu/getopt.in.h, libgnu/getopt1.c, libgnu/getopt_int.h, - libgnu/gettext.h, libgnu/stddef.in.h, libgnu/unistd.in.h: - Imported the getopt-gnu module from GNU gnulib. + libgnu/gettext.h, libgnu/stddef.in.h, libgnu/unistd.in.h: Imported + the getopt-gnu module from GNU gnulib. [27f4cf5b95c0] 2014-02-18 Kaz Nishimura - * po/ja.po, po/xllmnrd.pot: - Updated the translation files. + * po/ja.po, po/xllmnrd.pot: Updated the translation files. [c1c28bbda8c9] - * ChangeLog: - Updated the change log from the revision history. - [6ff4c41cdf0d] [release-1.2.1] + * NEWS, configure.ac: Merged release into default. + [f85018531d82] - * NEWS: - Updated the NEWS for version 1.2.1. + * Modified a maintainer build rule. + [0a265d19e704] + + * .hgtags: Added tag release-1.2.1 for changeset 6ff4c41cdf0d + [7f8bc9e78ae7] + + * ChangeLog: Updated the change log from the revision history. + [6ff4c41cdf0d] + + * NEWS: Updated the NEWS for version 1.2.1. [b66472460eea] - * po/ja.po, po/xllmnrd.pot: - Updated the translation files. + * po/ja.po, po/xllmnrd.pot: Updated the translation files. [77eea1f021d5] - * configure.ac: - Changed the version number. + * configure.ac: Merged hotfix/issue-41 into release (pull request #9). + [82c70e1049a2] + + * configure.ac: Changed the version number. [5c419e3057fe] 2014-02-17 Kaz Nishimura - * po/ja.po, po/xllmnrd.pot: - Updated the translations files. + * po/ja.po, po/xllmnrd.pot: Updated the translations files. [2bdc6c3e7708] - * configure.ac: - Modified a configure check to fix issue #41. + * configure.ac: Modified a configure check to fix issue #41. [983cf1c69fda] 2014-02-07 Kaz Nishimura - * NEWS: - Modified the NEWS text slightly. + * NEWS: Modified the NEWS text slightly. [daf4fb7a8f05] - * configure.ac: - Modified the version number for the next release cycle. + * configure.ac: Modified the version number for the next release + cycle. [f8962ff94761] - * ChangeLog: - Updated the change log from the revision history. - [e479c8a6598e] [release-1.2.0] + * Merge release into default. + [e9a28afd1bee] - * NEWS: - Updated the NEWS items. + * .hgtags: Added tag release-1.2.0 for changeset e479c8a6598e + [b4f541c6568d] + + * ChangeLog: Updated the change log from the revision history. + [e479c8a6598e] + + * NEWS: Updated the NEWS items. [983be9a6c7b4] - * configure.ac: - Changed the prerequisite GNU autoconf version. + * configure.ac: Changed the prerequisite GNU autoconf version. [fdbe4f1f4f85] 2014-02-07 xgettext - * po/ja.po, po/xllmnrd.pot: - Updated the translations files. + * po/ja.po, po/xllmnrd.pot: Updated the translations files. [03bcf7641868] 2014-02-07 Kaz Nishimura - * configure.ac: - Updated the version number for a new release. + * configure.ac: Updated the version number for a new release. [34263571a36a] + * Merge with default. + [94a563775b2a] + 2014-01-18 Kaz Nishimura - * src/ifaddr.c: - Removed some of the 'restricted' keywords. + * src/ifaddr.c: Removed some of the 'restricted' keywords. [8de85aa163b6] - * README: - Changed quotation marks. + * Merge with default. + [1749fadb353b] + + * README.md: Modified the text. + [2280dc5c27d2] + + * README.md: Modified the text. + [88d0e044d4b1] + + * README.md: Modified the text. + [750b013394f3] + + * README.md: Modified the text. + [599b2073cb40] + + * README: Changed quotation marks. [82c5c076cd93] - * README: - Updated the README content. + * README.md: Modified the Markdown text. + [4fd7ba94ac97] + + * README.md: Added a Markdown-formatted README file. + [96284f4232a3] + + * README: Updated the README content. [cf6f312ebf13] 2014-01-16 Kaz Nishimura - * lsb/xllmnrd.in: - Modified the LSB short description. + * lsb/xllmnrd.in: Modified the LSB short description. [6ea8b7f6329d] - * src/ifaddr.c: - Renamed static variables. + * src/ifaddr.c: Renamed static variables. [69e53e725376] - * src/ifaddr.c: - Updated comment text. + * src/ifaddr.c: Updated comment text. [547cc5e2eade] - * src/ifaddr.c: - Updated the copyright years. + * src/ifaddr.c: Updated the copyright years. [68f6823bbbc5] - * src/ifaddr.c: - Wrapped long lines. + * src/ifaddr.c: Wrapped long lines. [2d2ceadeb7e8] - * src/ifaddr.c: - Renamed 'struct ifaddr_if' and added a new member. Changed - 'ifaddr_add_addr_v6' and 'ifaddr_remove_addr_v6' to out-of-line. - Added 'ifaddr_find_interface'. + * src/ifaddr.c: Renamed 'struct ifaddr_if' and added a new member. [5abd222320f7] - * po/ja.po: - Updated the Japanese translations. + * po/ja.po: Updated the Japanese translations. [1b8b21d5457d] + * Run hg status after each successful build to detect unexpected file + changes. + [78a1bad00160] + 2014-01-09 Kaz Nishimura - * src/ifaddr.c: - Added a workaround for undefined s6_addr32. + * src/ifaddr.c: Added a workaround for undefined s6_addr32. [abbc4ddc2071] 2014-01-08 Kaz Nishimura - * src/Makefile.am: - Modified the rule to generate xllmnrd.8. + * src/Makefile.am: Modified the rule to generate xllmnrd.8. [d3e1c815b66a] - * Makefile.am: - Changed the name of the temporary file. + * Makefile.am: Changed the name of the temporary file. [27ba10df16f4] - * lsb/Makefile.am: - Added a sed substitution for the init script. + * lsb/Makefile.am: Added a sed substitution for the init script. [ff729be8698f] 2014-01-08 xgettext - * po/xllmnrd.pot: - Updated the pot file. + * po/xllmnrd.pot: Updated the pot file. [737c19c851d6] 2014-01-08 Kaz Nishimura - * src/main.c: - Updated the copyright years. + * src/main.c: Updated the copyright years. [daf23717262c] - * src/main.c: - Modified the help text. + * src/main.c: Modified the help text. [b3d0bb457270] 2014-01-07 Kaz Nishimura - * po/ja.po: - Updated translation years. + * po/ja.po: Updated translation years. [a6527abebe5c] - * po/ja.po: - Imported new translations. + * Merge feature/l10n-ja into default (pull request #8). + [bd32a9388b95] + + * po/ja.po: Imported new translations. [85ca13228747] 2014-01-06 Kaz Nishimura - * lsb/xllmnrd.in: - Modified the script behavior slightly. + * lsb/xllmnrd.in: Modified the script behavior slightly. [a18cca93a827] 2014-01-03 Kaz Nishimura - * po/ja.po: - Updated the po file. + * po/ja.po: Updated the po file. [ca018990b057] - * po/xllmnrd.pot: - Updated the pot file. + * Merge with default. + [cf9d01387ec0] + + * Changed to clean the build directory first. + [64eb7d0da59e] + + * Modified the build rules. + [66f46c4cebcc] + + * Reorganized the rules. + [dfe7dc612f4b] + + * po/xllmnrd.pot: Updated the pot file. [80e6cf03fedb] 2013-12-31 Kaz Nishimura - * src/main.c: - Redefine _GNU_SOURCE. + * src/main.c: Redefine _GNU_SOURCE. [bf4601193d65] 2013-12-30 Kaz Nishimura - * lsb/README: - Revised the README text. + * lsb/README: Revised the README text. [8aeb1670bdd3] - * lsb/xllmnrd.in: - Modified the init script. + * lsb/xllmnrd.in: Modified the init script. [a3aec686f405] - * po/LINGUAS, po/ja.po: - Added Japanese translations. + * po/LINGUAS, po/ja.po: Added Japanese translations. [df85cbf64409] - * po/xllmnrd.pot: - Included the pot file in version control. + * po/xllmnrd.pot: Included the pot file in version control. [ec30238dc5b2] - * lsb/README: - Added a README file for the init script. + * lsb/README: Added a README file for the init script. [d10aea208db8] - * ChangeLog: - Updated the change log from the revision history. + * ChangeLog: Updated the change log from the revision history. [0a5a0d75b77d] 2013-12-28 Kaz Nishimura - * lsb/xllmnrd.in: - Removed the empty Description. + * configure.ac: Merge feature/init-script into default (pull request + #7) + [261b385de4c5] + + * lsb/xllmnrd.in: Removed the empty Description. [7517bd16b782] - * lsb/xllmnrd.in: - Implemented the init script actions. + * lsb/xllmnrd.in: Implemented the init script actions. [3bcc288cc3b8] - * lsb/Makefile.am: - Changed to make a temporary file for the init script. + * lsb/Makefile.am: Changed to make a temporary file for the init + script. [814daf7dc846] - * configure.ac, src/ifaddr.c, src/llmnr.c, src/main.c: - Changed to use IEEE Std 1003.1-2008 by default. + * configure.ac, src/ifaddr.c, src/llmnr.c, src/main.c: Changed to use + IEEE Std 1003.1-2008 by default. [fd05aa788d83] - * configure.ac: - Added configure tests. + * configure.ac: Added configure tests. [8eb1e44f5bb1] 2013-12-24 Kaz Nishimura - * Makefile.am, configure.ac: - Changed the directory order. + * Makefile.am, configure.ac: Changed the directory order. [e3b1ac9ab8ed] - * configure.ac: - Changed the version number for snapshots. + * configure.ac: Merge with default. + [124e69825673] + + * Added another dependency. + [248d850211f8] + + * Backed out changeset: 99c66b88480e + [afb99b2ad814] + + * Added a dependency. + [99c66b88480e] + + * configure.ac: Changed the version number for snapshots. [7917af6a1805] + * Merge release back into default. + [e13da346cd3c] + 2013-12-23 Kaz Nishimura - * ChangeLog: - Updated the change log from the revision history for version 1.1.0 - (see issue #36). - [72c6f47d68d7] [release-1.1.0] + * .hgtags: Added tag release-1.1.0 for changeset 72c6f47d68d7, and + close issue #36 and issue #34. + [b4d3394de66e] + + * ChangeLog: Updated the change log from the revision history for + version 1.1.0 (see issue #36). + [72c6f47d68d7] - * NEWS: - Updated the NEWS file for version 1.1.0 and close issue #35. + * NEWS: Updated the NEWS file for version 1.1.0 and close issue #35. [74111a98a80c] - * configure.ac: - Changed the version number to 1.1.0 (see issue #36). + * configure.ac: Changed the version number to 1.1.0 (see issue #36). [3e2e9b9958a2] - * README: - Updated the README text with the project location (see issue #34). + * Merge with default. + [cfa995aef7e6] + + * README: Updated the README text with the project location (see issue + #34). [571f5284bafd] - * README: - Updated the README text (see issue #34). + * README: Updated the README text (see issue #34). [ec2677d4e0bf] - * src/xllmnrd.8.in: - Updated the manual page and close issue #32. + * src/xllmnrd.8.in: Updated the manual page and close issue #32. [ac86d73263e2] 2013-12-22 Kaz Nishimura - * ChangeLog: - Updated the change log from the revision history. + * ChangeLog: Updated the change log from the revision history. [10436f8116e3] 2013-12-21 Kaz Nishimura - * src/main.c: - Updated the help text for the new option, and closes issue #7. + * Correct the DESTDIR value again. + [bdbc772eb133] + + * Correct the DESTDIR value. + [9525c099f9fb] + + * Added commands to make a binary image. + [33497d6b4acb] + + * Added 'prefix' for test installation. + [363962f79bf7] + + * Merge feature/pid-file into default. + [e75567cff958] + + * src/main.c: Updated the help text for the new option, and closes + issue #7. [6b8564df3428] 2013-12-20 Kaz Nishimura - * src/main.c: - Removed a null pointer check in 'make_pid_file' (see issue #7). + * src/main.c: Removed a null pointer check in 'make_pid_file' (see + issue #7). [6cb7307309ca] - * src/main.c: - Added error handling for the pid file (see issue #7). + * src/main.c: Added error handling for the pid file (see issue #7). [6305760147cf] - * src/main.c: - Added a call to new function 'make_pid_file' if a pid file is - specified (see issue #7). + * src/main.c: Added a call to new function 'make_pid_file' if a pid + file is specified (see issue #7). [10ec74cb9f95] 2013-12-15 Kaz Nishimura - * configure.ac, src/main.c: - Added a configure test for . + * src/main.c: Merge with default. + [2b7e7ad51f03] + + * configure.ac, src/main.c: Added a configure test for . [fcbed000c5da] - * configure.ac, src/main.c: - Changed to use 'basename' from if available. + * configure.ac, src/main.c: Changed to use 'basename' from + if available. [f1b6b811336f] - * configure.ac: - Added a configure test for uint32_t. + * configure.ac: Added a configure test for uint32_t. [c60fd0d4e0b5] 2013-12-10 Kaz Nishimura - * src/xllmnrd.8.in: - Corrected the section number for 'gethostname'. + * src/xllmnrd.8.in: Corrected the section number for 'gethostname'. [8884be4c4efa] - * src/main.c: - Added a new option to specify the pid file (see issue #7). + * src/main.c: Added a new option to specify the pid file (see issue + #7). [46d315fa16e5] 2013-12-09 Kaz Nishimura - * configure.ac: - Removed 'strchrnul' from configure checks. + * configure.ac: Removed 'strchrnul' from configure checks. [51395c9277f3] - * src/responder.c: - Removed the use of 'strchrnul' for better portability. + * src/responder.c: Removed the use of 'strchrnul' for better + portability. [56e35a2be542] - * src/responder.c: - Changed to keep the host name as a DNS name instead of a DNS label. + * src/responder.c: Changed to keep the host name as a DNS name instead + of a DNS label. [03100e1aab8e] + * configure.ac: Merge release back into default + [138aa1cf743f] + + * .hgtags: Added tag release-1.0.1 for changeset 28d5c85bbac4 + [57729762a34a] + 2013-12-08 Kaz Nishimura - * ChangeLog: - Updated the change log from the revision history. - [28d5c85bbac4] [release-1.0.1] + * ChangeLog: Updated the change log from the revision history. + [28d5c85bbac4] - * NEWS: - Added a news item for an update release. + * NEWS: Added a news item for an update release. [7e690979c939] - * src/main.c: - Corrected the error check for 'responder_init' to fix issue #30. + * src/main.c: Corrected the error check for 'responder_init' to fix + issue #30. [3754f5221ba7] - * configure.ac: - Changed the version number for an update release. + * configure.ac: Changed the version number for an update release. [9005eb10f8e9] 2013-12-07 Kaz Nishimura - * lsb/xllmnrd.in: - Added actions. + * lsb/xllmnrd.in: Added actions. [7ad1e776378f] - * lsb/xllmnrd.in: - Added the copyright and permission notices. + * lsb/xllmnrd.in: Added the copyright and permission notices. [111bc2ef2f2b] - * configure.ac: - Changed the version number for next minor versions. + * configure.ac: Merge with default. + [dc4bf2721795] + + * Merge release back into default. + [a63bd5ffdbeb] + + * .hgtags: Added tag release-1.0.0 for changeset fab9f6db574c + [94dd58f75330] + + * configure.ac: Changed the version number for next minor versions. [e8d4556c8bcc] - * ChangeLog: - Updated the change log from the revision history. - [fab9f6db574c] [release-1.0.0] + * ChangeLog: Updated the change log from the revision history. + [fab9f6db574c] - * src/responder.c: - Replaced a check for the destination address with one for the sender - address. Also renamed a function. + * src/responder.c: Replaced a check for the destination address with + one for the sender address. [f5bf2e60e542] - * NEWS: - Updated the news (see issue #29). + * NEWS: Updated the news (see issue #29). [3d152484e0f7] - * README: - Updated the package description. + * Merge default into release. + [c885d2e48230] + + * README: Updated the package description. [5a9700d7190a] - * src/responder.c: - Renamed symbols. + * src/responder.c: Renamed symbols. [ea8e5731e94b] - * src/ifaddr.c: - Modified a comment slightly. + * src/ifaddr.c: Modified a comment slightly. [4ab418ca7814] - * configure.ac: - Changed the version number to 1.0.0, canceling milestone 1.0y3. See - issue #29. + * configure.ac: Changed the version number to 1.0.0, canceling + milestone 1.0y3. [35267c8b17ab] - * src/llmnr_packet.h, src/responder.c: - Added new inline function to read or write data in a LLMNR packet. + * Merge feature/responder into default. + [3b46055a1cfb] + + * src/llmnr_packet.h, src/responder.c: Added new inline function to + read or write data in a LLMNR packet. [39d587d89418] 2013-12-06 Kaz Nishimura - * src/responder.c: - Added an answer section. + * src/responder.c: Added an answer section. [5b25ad2cc855] + * Revised the last change. + [ffa6a2eaddc5] + + * Modified the 'all' target. + [fe1ef7e13318] + 2013-12-05 Kaz Nishimura - * configure.ac: - Removed unnecessary checks for C90 headers and symbols. + * Merge feature/responder into default. + [fcce1c55d1b5] + + * configure.ac: Removed unnecessary checks for C90 headers and + symbols. [be76953aa933] - * configure.ac: - Backed out changeset: 8ce2f90aeb50 + * configure.ac: Backed out changeset: 8ce2f90aeb50 [f0d2cef24cc5] - * configure.ac: - Added a configure check for stddef.h. + * configure.ac: Added a configure check for stddef.h. [8ce2f90aeb50] - * src/llmnr_packet.h, src/responder.c: - Reorganized the responding functions. + * src/llmnr_packet.h, src/responder.c: Reorganized the responding + functions. [d5e6a7512e37] 2013-12-04 Kaz Nishimura - * src/ifaddr.c: - Removed a volatile qualifier from 'refresh_not_in_progress'. + * Merge with default. + [32dfe11da555] + + * src/ifaddr.c: Removed a volatile qualifier from + 'refresh_not_in_progress'. [b91dec8e85dd] - * src/ifaddr.c: - Added new inline functions. + * src/ifaddr.c: Added new inline functions. [e67a972e7da5] - * src/ifaddr.c: - Replaced 'abort_if_error'. + * src/ifaddr.c: Replaced 'abort_if_error'. [e83af104a1fd] - * src/ifaddr.c: - Made IPv4 address arrays dynamically allocated to fix issue #25. - Also see issue #23. + * Merged feature/ifaddr-v4 into default. + [3a2773583d32] + + * src/ifaddr.c: Made IPv4 address arrays dynamically allocated to fix + issue #25. [c4030a147959] 2013-12-03 Kaz Nishimura - * src/ifaddr.c: - Modified interface record handling for IPv4 addresses. + * src/ifaddr.c: Modified interface record handling for IPv4 addresses. [c7260af82bc4] - * README: - Updated the file contents. + * README: Updated the file contents. [e037e73b0db0] 2013-12-01 Kaz Nishimura - * src/ascii.h: - Removed tabs in header files. + * src/llmnr_responder.c, src/llmnr_responder.h: Merge with default. + [2d8a75192e03] + + * src/ascii.h: Removed tabs in header files. [d74929f566de] - * src/responder.h: - Renamed the macro for include-once. + * src/responder.h: Renamed the macro for include-once. [c6178d861bfc] * src/Makefile.am, src/llmnr.c, src/llmnr.h, src/responder.c, - src/responder.h: - Moved common declarations for LLMNR to a new unit. + src/responder.h: Moved common declarations for LLMNR to a new unit. [b0ab6c765f73] 2013-11-29 Kaz Nishimura - * NEWS: - Corrected gramatical number in the news. + * NEWS: Corrected gramatical number in the news. [66d57134aeef] - * ChangeLog: - Refreshed the change log from the revision history. - [ecf618ed0e61] [release-1.0y2] + * Merged release into default, closing issue #26. + [68a2934a70af] - * NEWS: - Updated the news. + * .hgtags: Added tag release-1.0y2 for changeset ecf618ed0e61 + [e5d9c48e320d] + + * ChangeLog: Refreshed the change log from the revision history. + [ecf618ed0e61] + + * NEWS: Updated the news. [3a3abc8ccb20] 2013-11-28 Kaz Nishimura - * src/xllmnrd.8.in: - Updated the manual page, closing issue #14. + * src/xllmnrd.8.in: Updated the manual page, closing issue #14. [4a5a8d2e43c9] - * lsb/Makefile.am: - Added rules for the new init script. + * lsb/Makefile.am: Added rules for the new init script. [254618ee439b] - * lsb/xllmnrd.in: - Created an init script template. + * lsb/xllmnrd.in: Created an init script template. [9e5b34720452] - * Makefile.am, configure.ac: - Added the new subdirectory in the make process. + * Makefile.am, configure.ac: Added the new subdirectory in the make + process. [627534738f33] - * lsb/Makefile.am: - Added a new subdirectory. + * lsb/Makefile.am: Added a new subdirectory. [e91a8bf98ef5] - * configure.ac: - Changed the version number for the next milestone. + * configure.ac: Changed the version number for the next milestone. [d2bfd112dea5] - * po/LINGUAS: - Added an initial set of languages. + * src/llmnr_responder.c, src/llmnr_responder.h: Merged default into + release. + [2cfda1d4d1c9] + + * po/LINGUAS: Added an initial set of languages. [750b2a8b320e] 2013-11-27 Kaz Nishimura - * src/main.c: - Changed message strings. + * src/main.c: Changed message strings. [2877a84b1116] - * src/Makefile.am: - Added gettext.h into the distribution. + * Merged feature/gettext into default, closing issue #19. + [f13770612a81] + + * src/Makefile.am: Added gettext.h into the distribution. [b384bccc37c6] - * src/Makefile.am, src/main.c: - Enabled NLS. + * src/Makefile.am, src/main.c: Enabled NLS. [b3276114cfbf] 2013-11-27 Free Software Foundation, Inc. - * src/gettext.h: - Added a file for localization. + * src/gettext.h: Added a file for localization. [2036ad183b2c] 2013-11-27 Kaz Nishimura - * src/main.c: - Implemented option '-n', which closes issue #24. + * Makefile.am, configure.ac, src/llmnr_responder.c, + src/llmnr_responder.h: Merged with default. + [ba87c19010e2] + + * src/main.c: Implemented option '-n', which closes issue #24. [244c547a9276] - * src/main.c: - Added a new option (see issue #24). + * src/main.c: Added a new option (see issue #24). [ebe3f8bc3524] + * src/llmnr_responder.c, src/llmnr_responder.h: Merged + feature/responder into default. + [3700e81844ec] + * src/Makefile.am, src/llmnr_responder.c, src/llmnr_responder.h, - src/main.c, src/responder.c, src/responder.h: - Changed file names shorter. + src/main.c, src/responder.c, src/responder.h: Changed file names + shorter. [1d11c28efa45] - * src/llmnr_responder.c, src/llmnr_responder.h, src/main.c: - Removed the 'llmnr_' prefix from the responder symbols. + * src/llmnr_responder.c, src/llmnr_responder.h, src/main.c: Removed + the 'llmnr_' prefix from the responder symbols. [0f5c88a2a32c] - * src/llmnr_responder.c: - Made the responder respond with an empty answer section. + * src/llmnr_responder.c: Made the responder respond with an empty + answer section. [276542a4ae31] - * src/llmnr_responder.c, src/llmnr_responder.h: - Cleaned up the source code with commenting and reordering. + * src/llmnr_responder.c, src/llmnr_responder.h: Cleaned up the source + code with commenting and reordering. [2046e79e508a] + * Merged with default. + [bc3a34806f88] + 2013-11-26 Kaz Nishimura - * src/ifaddr.c: - Renamed functions and added comments (see issue #22). + * src/ifaddr.c: Renamed functions and added comments (see issue #22). [f1a2eac717ca] - * src/ifaddr.c: - Implemented 'ifaddr_add_if_addr_v4' and 'ifaddr_remove_if_addr_v4'. + * src/ifaddr.c: Implemented 'ifaddr_add_if_addr_v4' and + 'ifaddr_remove_if_addr_v4'. [fa262e3d7466] - * src/ifaddr.c: - Added code to enumerate network interfaces with IPv4 in addition to - IPv6. + * src/ifaddr.c: Added code to enumerate network interfaces with IPv4 + in addition to IPv6. [61b630eec212] - * src/ifaddr.c: - Restructed an if statement. + * src/ifaddr.c: Restructed an if statement. [d135b884a261] 2013-11-23 Kaz Nishimura - * src/ifaddr.c: - Added a check for inteface scopes. + * src/ifaddr.c: Added a check for inteface scopes. [cdb441511b09] - * src/llmnr_responder.c: - Implemented QNAME matching. + * src/llmnr_responder.c: Implemented QNAME matching. [186795e5c4ed] - * test/Makefile.am: - Moved the deletion of XML result files to 'clean'. + * test/Makefile.am: Moved the deletion of XML result files to 'clean'. [5b67527c5e21] - * src/ifaddr.c: - Removed unnecessary assertions. + * Added mostlyclean. + [985668c8703d] + + * Merged with default. + [b17443eba6ba] + + * src/ifaddr.c: Removed unnecessary assertions. [29c661a0c922] - * configure.ac: - Added 'strchrnul' to the configure checks. + * configure.ac: Added 'strchrnul' to the configure checks. [c7525458789e] - * configure.ac: - Added 'basename' to the configure checks. + * configure.ac: Added 'basename' to the configure checks. [3069da99d99f] 2013-11-22 Kaz Nishimura - * src/Makefile.am: - Added ascii.h into the package. + * src/Makefile.am: Added ascii.h into the package. [ea62e772f59f] 2013-11-23 Kaz Nishimura - * src/llmnr_responder.c: - Backed out changeset: a2f55ae5757e. + * src/llmnr_responder.c: Backed out changeset: a2f55ae5757e. [f142efe818ac] 2013-11-22 Kaz Nishimura - * src/llmnr_responder.c: - Added an uppercase conversion in 'llmnr_responder_set_host_name'. + * src/llmnr_responder.c: Added an uppercase conversion in + 'llmnr_responder_set_host_name'. [a2f55ae5757e] - * src/ascii.h: - Added a new header. + * src/ascii.h: Added a new header. [f9328c0b106a] 2013-11-21 Kaz Nishimura @@ -864,287 +2333,301 @@ Implemented question decoding code. [f2da6e55b2a9] - * src/llmnr_packet.h: - Changed to use uint8_t for octets with a macro addtion. + * src/llmnr_packet.h: Changed to use uint8_t for octets with a macro + addtion. [548a371010b1] + * Merged with default. + [1ae0c6b669c6] + + * configure.ac, src/main.c: Merged in feature/config-revision (pull + request #6). + [db6ffd5a4aa9] + 2013-11-20 Kaz Nishimura - * configure.ac: - Modified comments (see issue #20). + * src/main.c: Merged feature/responder into default. + [1e638d018076] + + * configure.ac: Modified comments (see issue #20). [44d3f1f002b7] - * src/main.c: - Added output for 'PACKAGE_REVISION' if defined (see issue #20). + * src/main.c: Added output for 'PACKAGE_REVISION' if defined (see + issue #20). [a8dbd79b51d8] - * Makefile.am: - Removed a pair of quotes (see issue #20). + * Makefile.am: Removed a pair of quotes (see issue #20). [8cef8fa2cbc0] 2013-11-19 Kaz Nishimura - * Makefile.am: - Added code to make 'config.revision' in the distdir. + * Makefile.am: Added code to make 'config.revision' in the distdir. [6ca777e54064] - * configure.ac: - Changed 'PACKAGE_REVISON' to be defined only if 'config.revision' - exists. + * configure.ac: Changed 'PACKAGE_REVISON' to be defined only if + 'config.revision' exists. [2957f9cfb620] - * ABOUT-NLS: - Added the file 'ABOUT-NLS' into version control. + * configure.ac: Merged with default. + [ecfc0aa5ed51] + + * ABOUT-NLS: Added the file 'ABOUT-NLS' into version control. [3c340c4c1fcf] - * configure.ac, src/main.c: - Added code to set the host name. + * configure.ac, src/main.c: Added code to set the host name. [ad9c3b5299be] - * configure.ac, src/llmnr_responder.c, src/llmnr_responder.h: - Added new function 'llmnr_responder_set_host_name'. + * configure.ac, src/llmnr_responder.c, src/llmnr_responder.h: Added + new function 'llmnr_responder_set_host_name'. [c5e1fe0257e9] - * Makefile.am, configure.ac, po/Makevars, po/POTFILES.in: - Applied minimal changes for gettext (see issue #19). + * Makefile.am, configure.ac, po/Makevars, po/POTFILES.in: Applied + minimal changes for gettext (see issue #19). [336f9cb368e6] - * src/main.c: - Modified a message string. + * src/main.c: Modified a message string. [9817d0a388f8] - * configure.ac, src/main.c: - Corrected minor text formatting problems. + * Merged with default. + [5638224bfa64] + + * configure.ac, src/main.c: Corrected minor text formatting problems. [4cfaac47e5e5] 2013-11-18 Kaz Nishimura - * ChangeLog: - Updated the change log from the revision history and closed issue - #13. - [efcb7238dabf] [release-1.0y1] + * Merged release into default. + [3a7ebd090d9c] + + * .hgtags: Added tag release-1.0y1 for changeset efcb7238dabf + [857418a3e7db] + + * ChangeLog: Updated the change log from the revision history and + closed issue #13. + [efcb7238dabf] - * README: - Updated the file contents for release (see issue #13). + * README: Updated the file contents for release (see issue #13). [628eeeeef5f9] - * NEWS: - Removed the Emacs mode line. + * NEWS: Removed the Emacs mode line. [d6d823ab4fcd] - * NEWS: - Edited the file contents. + * NEWS: Edited the file contents. [19358ba185cd] - * NEWS: - Reformatted the file contents (see issue #13). + * NEWS: Reformatted the file contents (see issue #13). [f850029c7961] - * NEWS: - Updated the 'NEWS' contents. See issue #13. + * NEWS: Updated the 'NEWS' contents. See issue #13. [049017406837] 2013-11-17 Kaz Nishimura - * src/main.c: - Modified a comment. + * src/main.c: Modified a comment. [256a9956db95] - * src/ifaddr.c: - Renamed a variable. + * src/ifaddr.c: Renamed a variable. [4e45de9a2ae6] - * configure.ac: - Changed the version number. + * configure.ac: Changed the version number. [76bd62278a98] - * src/ifaddr.c: - Reduced verbose logs and cleaned up code. + * src/ifaddr.c: Reduced verbose logs and cleaned up code. [9e2f2a4865f2] - * src/main.c: - Removed no-op code added to suppress a warning. + * Merged feature/responder into default. + [32ca1bfacac4] + + * src/main.c: Removed no-op code added to suppress a warning. [1e340a6b1c26] - * src/llmnr_responder.c, src/llmnr_responder.h: - Added an ifaddr_change handler, and fixed issue #8. + * src/llmnr_responder.c, src/llmnr_responder.h: Added an ifaddr_change + handler, and fixed issue #8. [f5b1a788e501] - * src/main.c: - Changed the syslog settings. + * Merged with default. + [de33feb50c00] + + * src/main.c: Changed the syslog settings. [2aa1fd5aaa4f] - * src/main.c: - Added the handler for SIGUSR2, and fixed issue #16. + * src/main.c: Added the handler for SIGUSR2, and fixed issue #16. [01e781cb15ce] - * src/main.c: - Just modified comments. + * src/main.c: Just modified comments. [269a2ef01aab] - * configure.ac, src/main.c: - Changed the option parsing once more taking care of locale changes. + * configure.ac, src/main.c: Changed the option parsing once more + taking care of locale changes. [7651d81cadbc] - * test/testifaddr.cpp: - Included . + * test/testifaddr.cpp: Included . [31204d552fc1] 2013-11-16 Kaz Nishimura - * src/main.c: - Modified the version information output. + * src/main.c: Modified the version information output. [0294839a2a00] - * configure.ac, src/main.c: - Modified some option handling, fixing issue #6. + * configure.ac, src/main.c: Modified some option handling, fixing + issue #6. [96877c8283bd] 2013-11-14 Kaz Nishimura - * src/llmnr_packet.h: - Added new function 'llmnr_data'. + * src/llmnr_packet.h: Added new function 'llmnr_data'. [c15c88bed435] - * src/ifaddr.c: - Modified error handling. + * Merged with default. + [da0321cf3880] + + * src/ifaddr.c: Modified error handling. [fb6f61bcd8bc] - * src/ifaddr.c: - Renamed variables for clarity. + * src/ifaddr.c: Renamed variables for clarity. [a484cba1d309] 2013-11-13 Kaz Nishimura - * src/ifaddr.c, src/ifaddr.h, test/testifaddr.cpp: - Implemented interface change notification. + * Merged feature/ifaddr into default. + [12fa4d528323] + + * src/ifaddr.c, src/ifaddr.h, test/testifaddr.cpp: Implemented + interface change notification. [5909dbd30c40] - * src/ifaddr.c, src/ifaddr.h: - Allowed the second argument of 'ifaddr_lookup' to be null. + * src/ifaddr.c, src/ifaddr.h: Allowed the second argument of + 'ifaddr_lookup' to be null. [266e54ae2a67] - * src/ifaddr.c, src/ifaddr.h, test/testifaddr.cpp: - Made the ifaddr interface clearer. + * src/ifaddr.c, src/ifaddr.h, test/testifaddr.cpp: Made the ifaddr + interface clearer. [3fcc2937e0aa] - * src/ifaddr.c: - Changed several error numbers. + * src/ifaddr.c: Changed several error numbers. [0e81bd70f2e3] - * src/ifaddr.c, src/ifaddr.h: - Modified 'ifaddr_lookup' regarding error handling. + * src/ifaddr.c, src/ifaddr.h: Modified 'ifaddr_lookup' regarding error + handling. [fc96411f02d8] - * test/testifaddr.cpp: - Updated the unit tests for ifaddr. + * test/testifaddr.cpp: Updated the unit tests for ifaddr. [0384ed9554e3] - * configure.ac: - Added the 'PACKAGE_REVISION' definition in configure.ac. + * src/llmnr_header.h: Merged with default. + [9dbf2c78d88e] + + * configure.ac: Added the 'PACKAGE_REVISION' definition in + configure.ac. [5088daded79c] 2013-11-12 Kaz Nishimura - * src/llmnr_responder.c: - Added code to 'llmnr_responder_handle_query'. + * src/llmnr_header.h: Merged feature/responder into default. + [0021ad5ad1f4] + + * src/llmnr_responder.c: Added code to 'llmnr_responder_handle_query'. [900f14f06132] - * src/llmnr_packet.h: - Used uint_fast16_t for a local variable. + * src/llmnr_packet.h: Used uint_fast16_t for a local variable. [8f212b8f2a64] - * src/llmnr_responder.c: - Renamed a local variable. + * src/llmnr_responder.c: Renamed a local variable. [8d12ce8f57c5] - * src/Makefile.am: - Fixed forgotten rename in the Makefile. + * src/Makefile.am: Fixed forgotten rename in the Makefile. [e29f1baecd06] * src/llmnr_header.h, src/llmnr_packet.h, src/llmnr_responder.c: - Renamed file 'llmnr_header.h' to 'llmnr_packet.h'. Renamed function - 'llmnr_header_is_valid_query' to 'llmnr_is_valid_query'. + Renamed file 'llmnr_header.h' to 'llmnr_packet.h'. [2a1b0c29d224] - * src/llmnr_responder.c, src/llmnr_responder.h, src/main.c: - Modified the module initialization and finalization. + * src/llmnr_responder.c, src/llmnr_responder.h, src/main.c: Modified + the module initialization and finalization. [3f6e8629e5a3] - * src/llmnr_responder.c: - Added new function 'llmnr_responder_handle_query'. + * src/llmnr_responder.c: Added new function + 'llmnr_responder_handle_query'. [838603487d40] - * src/llmnr_responder.c: - Rewrote 'llmnr_open_udp_socket' with a rename to 'open_udp6' + * src/llmnr_responder.c: Rewrote 'llmnr_open_udp_socket' with a rename + to 'open_udp6' [399a1585203e] - * src/llmnr_responder.c: - Defined IN6ADDR_LLMNR_INIT as a macro. + * src/llmnr_responder.c: Defined IN6ADDR_LLMNR_INIT as a macro. [1e9fd3be96e8] - * src/llmnr_responder.c, src/main.c: - Modified the config.h inclusion to angle brackets. + * src/llmnr_responder.c, src/main.c: Modified the config.h inclusion + to angle brackets. [d0de0857ab1a] 2013-11-11 Kaz Nishimura - * test/testifaddr.cpp: - Reorganized tests. + * Merged feature/ifaddr into default. + [e17e0f01eb4c] + + * .hgignore: Modified the Mercurial ignore patterns. + [24161f0df942] + + * test/testifaddr.cpp: Reorganized tests. [43a858c62433] - * src/ifaddr.c: - Implemented 'ifaddr_lookup'. + * src/ifaddr.c: Implemented 'ifaddr_lookup'. [2341ecce78cc] - * src/ifaddr.c: - Added a mutex to synchronize accesses to the interface table. + * src/ifaddr.c: Added a mutex to synchronize accesses to the interface + table. [8f0bfe1233a1] - * src/ifaddr.c: - Suppressed log output when an interface address is not actually - removed. + * src/ifaddr.c: Suppressed log output when an interface address is not + actually removed. [5c337d7cd754] +2013-11-10 Kaz Nishimura + + * Merged with default. + [0092e412a06a] + 2013-11-09 Kaz Nishimura - * src/ifaddr.c: - Made the interface table. + * src/ifaddr.c: Made the interface table. [fbcff6ab151e] - * test/Makefile.am, test/testmain.cpp: - Changed to make the CppUnit output in a separate XML file. + * test/Makefile.am, test/testmain.cpp: Changed to make the CppUnit + output in a separate XML file. [0b28e0a190c5] - * test/testmain.cpp: - Changed the output to XML. + * test/testmain.cpp: Changed the output to XML. [dad36b1c8a75] 2013-11-08 Kaz Nishimura - * src/ifaddr.c: - Added a restrict qualifier to the second argument of + * Merged feature/ifaddr into default. + [9d81d3d60187] + + * src/ifaddr.c: Added a restrict qualifier to the second argument of 'abort_if_error'. [421dd055f676] - * src/ifaddr.c: - Changed the signature of 'open_rtnetlink'. + * src/ifaddr.c: Changed the signature of 'open_rtnetlink'. [095124aa0d96] - * src/ifaddr.c, src/ifaddr.h: - Renamed the argument of 'ifaddr_initialize'. + * src/ifaddr.c, src/ifaddr.h: Renamed the argument of + 'ifaddr_initialize'. [c818f6b56b7d] - * src/ifaddr.c, test/testifaddr.cpp: - Added two helper functions for thread synchronization. + * src/ifaddr.c, test/testifaddr.cpp: Added two helper functions for + thread synchronization. [12e3b432430c] - * src/ifaddr.c: - Moved code to clear the 'terminated' flag. + * src/ifaddr.c: Moved code to clear the 'terminated' flag. [cbe76cd52c7d] - * src/ifaddr.c, src/ifaddr.h, src/main.c, test/testifaddr.cpp: - Changed 'ifaddr_refresh' to return an error number on failure. + * src/ifaddr.c: Merged with default. + [2d42582ce493] + + * src/ifaddr.c, src/ifaddr.h, src/main.c, test/testifaddr.cpp: Changed + 'ifaddr_refresh' to return an error number on failure. [090bb2d6ef8e] 2013-11-07 Kaz Nishimura @@ -1155,605 +2638,607 @@ 2013-11-06 Kaz Nishimura - * configure.ac: - Changed the version number for upcoming milestone 1.0y1. + * Merged with default. + [1400398c71e9] + + * configure.ac: Changed the version number for upcoming milestone + 1.0y1. [f5f6e09e08fc] 2013-11-05 Kaz Nishimura - * ChangeLog: - Updated from the revision history. + * ChangeLog: Updated from the revision history. [33e30aaae9e3] - * src/ifaddr.c: - Moved 'open_rtnetlink' to make it inline. + * src/ifaddr.c: Moved 'open_rtnetlink' to make it inline. [584180bff739] - * src/ifaddr.c: - Excluded . + * Merged feature/ifaddr into default. + [b2d1cf7e05e7] + + * src/ifaddr.c: Excluded . [674df1e4eb6e] - * src/ifaddr.c: - Made be included conditionally. + * src/ifaddr.c: Made be included conditionally. [3a5f6c76238c] - * src/ifaddr.c, src/ifaddr.h, src/main.c, test/testifaddr.cpp: - Added code to make the worker thread terminated properly to fix - issue #12. + * src/ifaddr.c, src/ifaddr.h, src/main.c, test/testifaddr.cpp: Added + code to make the worker thread terminated properly to fix issue #12. [5a9dce72160c] - * src/ifaddr.c: - Added a const qualifier to the first argument of + * src/ifaddr.c: Added a const qualifier to the first argument of 'ifaddr_decode_nlmsg'. [78687b032cb3] - * test/Makefile.am, test/testifaddr.cpp: - Added a test fixture for ifaddr (see issue #11). + * test/Makefile.am, test/testifaddr.cpp: Added a test fixture for + ifaddr (see issue #11). [0596fce2c828] - * src/ifaddr.c: - Changed ifaddr back to single-initialization. + * src/ifaddr.c: Changed ifaddr back to single-initialization. [9c21afe7386a] + * Merged with default. + [a02ebb05c023] + +2013-11-04 Kaz Nishimura + + * Added the CXX definition for the test driver. + [849b2bc82ea4] + 2013-11-03 Kaz Nishimura - * test/testmain.cpp: - Removed extra blank lines. + * test/testmain.cpp: Removed extra blank lines. [603ba2e04280] - * test/Makefile.am, test/testmain.cpp: - Added a unit test driver. + * Merged feature/unittest into default. + [f2373c054132] + + * test/Makefile.am, test/testmain.cpp: Added a unit test driver. [feb10d25656b] 2013-11-01 Kaz Nishimura - * src/ifaddr.c: - Moved the ifaddrmsg handling code into new function + * src/ifaddr.c: Moved the ifaddrmsg handling code into new function ifaddr_handle_ifadddrmsg(). [0218e801bfd7] +2013-10-23 Kaz Nishimura + + * Merged default into feature/ifaddr. + [f46e7c96d6db] + 2013-10-22 Kaz Nishimura - * configure.ac: - Added configure checks for CppUnit. + * Changed to pass CFLAGS to make check only. + [b2a4d468f342] + + * Changed to pass CC as an environment variable. + [37d0620bee36] + + * Set CC explicitly. + [db7b24508292] + + * configure.ac: Added configure checks for CppUnit. [6306a401bb56] - * configure.ac: - Changed the URL. + * configure.ac: Changed the URL. [836674ab33c2] - * src/ifaddr.c: - Modified comment text. + * Changed the default rule. + [b7c7c3435f88] + + * Merged default into feature/ifaddr. + [10466a66d9c3] + + * src/ifaddr.c: Modified comment text. [1f9e70a6d20d] - * src/ifaddr.c: - Added RTM_NEWADDR handling. + * src/ifaddr.c: Added RTM_NEWADDR handling. [11a86b102ac5] +2013-10-21 Kaz Nishimura + + * Set custom CFLAGS. + [804fb6398201] + + * Renamed the stamp file. + [92e2de2414aa] + +2013-10-20 Kaz Nishimura + + * Added a missing mkdir command in build.makefile. + [ada64e04dbe7] + + * Added build.makefile for maintenance jobs. + [1c276db4d324] + 2013-10-13 Kaz Nishimura - * Makefile.am: - Removed an argument from the rm command. + * Makefile.am: Removed an argument from the rm command. [a731be9ec832] - * Makefile.am: - Modified the dist-hook target. + * Makefile.am: Modified the dist-hook target. [c2868457d063] 2013-09-25 Kaz Nishimura - * README: - Added a heading line in README. + * README: Added a heading line in README. [660d852355c6] 2013-09-22 Kaz Nishimura - * test/Makefile.am: - Added test/Makefile.am to fix issue #10. + * test/Makefile.am: Added test/Makefile.am to fix issue #10. [b4c5f8eeb984] - * Makefile.am, configure.ac: - Added the test subdirectory. + * Makefile.am, configure.ac: Added the test subdirectory. [418dcccc094e] 2013-09-21 Kaz Nishimura - * src/Makefile.am: - Added xllmnrd.8 to CLEANFILES. + * src/Makefile.am: Added xllmnrd.8 to CLEANFILES. [5e48155ce2d1] - * src/Makefile.am: - Fixed a macro name. + * src/Makefile.am: Fixed a macro name. [b5307acf32f2] - * src/Makefile.am: - Added dependency so that the target will be rebuilt when Makefile - changes. + * src/Makefile.am: Added dependency so that the target will be rebuilt + when Makefile changes. [0d29b27fc0e2] 2013-09-22 Kaz Nishimura - * src/Makefile.am: - Added a manual page target into src/Makefile.am. + * src/Makefile.am: Added a manual page target into src/Makefile.am. [3bf50c9fa119] - * src/xllmnrd.8.in, xllmnrd.8.in: - Moved the manual page template into src and added license comments. + * src/xllmnrd.8.in, xllmnrd.8.in: Moved the manual page template into + src and added license comments. [e1c1ec5e680a] - * Makefile.am, configure.ac: - Removed the manual page from AC_CONFIG_FILES. + * Makefile.am, configure.ac: Removed the manual page from + AC_CONFIG_FILES. [e6f2233f65b3] 2013-09-21 Kaz Nishimura - * src/ifaddr.c: - Renamed ifaddr_open_rtnetlink() to open_rtnetlink(). + * src/ifaddr.c: Renamed ifaddr_open_rtnetlink() to open_rtnetlink(). [dbce808cf893] - * src/ifaddr.c: - Added an assertion in ifaddr_run(). + * src/ifaddr.c: Added an assertion in ifaddr_run(). [965fb869a61b] 2013-09-20 Kaz Nishimura - * src/ifaddr.c: - Removed an initialization check in ifaddr_run(). + * src/ifaddr.c: Removed an initialization check in ifaddr_run(). [8f28777d4eb1] 2013-09-16 Kaz Nishimura - * configure.ac: - Removed Automake version dependency from configure.ac. + * configure.ac: Removed Automake version dependency from configure.ac. [701f8123a55e] - * README: - Modified the content of the 'README' file. + * README: Modified the content of the 'README' file. [ab6e71f8eca7] 2013-09-10 Kaz Nishimura * AUTHORS, src/ifaddr.c, src/ifaddr.h, src/llmnr_header.h, - src/llmnr_responder.c, src/llmnr_responder.h, src/main.c: - Updated the author name. + src/llmnr_responder.c, src/llmnr_responder.h, src/main.c: Updated + the author name. [b1f98fc1a701] 2013-09-09 Kaz Nishimura - * src/main.c: - Used EX_USAGE for command errors. + * src/main.c: Used EX_USAGE for command errors. [87d21b3ac02f] - * src/main.c: - Added a conditional include for . + * src/main.c: Added a conditional include for . [f80ea1a6d119] - * configure.ac: - Added a configure test for . + * configure.ac: Added a configure test for . [f697fb76a119] 2013-09-07 Kaz Nishimura * src/Makefile.am, src/llmnr.h, src/llmnr_responder.c, - src/llmnr_responder.h, src/main.c: - Renamed llmnr.h to llmnr_responder.h to close issue #9. + src/llmnr_responder.h, src/main.c: Renamed llmnr.h to + llmnr_responder.h to close issue #9. [8dad9c2136ab] 2013-07-03 Kaz Nishimura - * configure.ac: - Updated the HEADERS and FUNCS lists. + * configure.ac: Updated the HEADERS and FUNCS lists. [2191f6bc54da] +2013-06-19 Kaz Nishimura + + * Merged ifaddr into default. + [56f62164df7a] + 2013-06-09 Kaz Nishimura - * src/ifaddr.c, src/llmnr_responder.c: - Changed the code spacing slightly. + * src/ifaddr.c, src/llmnr_responder.c: Changed the code spacing + slightly. [2559d5cc17e3] 2013-06-05 Kaz Nishimura - * src/ifaddr.c: - Added a wait for refresh completion. + * src/ifaddr.c: Added a wait for refresh completion. [384319ad8b28] - * src/ifaddr.c: - Removed the use of PRIu16. + * src/ifaddr.c: Removed the use of PRIu16. [0fb85cb114ca] - * src/ifaddr.c: - Fixed the return value of ifaddr_initialize. + * src/ifaddr.c: Fixed the return value of ifaddr_initialize. [8d0d1aa850c5] +2013-06-04 Kaz Nishimura + + * src/ifaddr.c, src/ifaddr.h, src/llmnr_responder.c, src/main.c: + Merged default into ifaddr. + [473ccf502ebc] + 2013-06-01 Kaz Nishimura - * src/ifaddr.c, src/ifaddr.h: - Added new function ifaddr_refresh(). Modified the netlink message - decoder in ifaddr_run(). + * src/ifaddr.c, src/ifaddr.h: Added new function ifaddr_refresh(). [de92542d5010] 2013-05-22 Kaz Sasa - * src/ifaddr.c: - Added a worker thread in ifaddr. + * src/ifaddr.c: Added a worker thread in ifaddr. [58e03751c113] 2013-05-19 Kaz Sasa * src/ifaddr.c, src/ifaddr.h, src/llmnr.h, src/llmnr_header.h, - src/llmnr_responder.c, src/main.c: - Modified file header comments. + src/llmnr_responder.c, src/main.c: Modified file header comments. [0d186b25d157] 2013-05-18 Kaz Sasa - * xllmnrd.8.in: - Added a missing backslash in the NAME section. + * xllmnrd.8.in: Added a missing backslash in the NAME section. [11ea089f23f2] +2013-05-17 Kaz Sasa + + * Merged default into ifaddr. + [4a1d5fc4d470] + +2013-05-16 Kaz Sasa + + * .hgignore: Added final output files to .hgignore + [5f0dc3bf173d] + 2013-05-11 Kaz Sasa - * src/main.c: - Added a call to ifaddr_finalize() before clean termination by - signals. + * src/main.c: Added a call to ifaddr_finalize() before clean + termination by signals. [c07a6952d68a] - * README: - Modified the README text. + * README: Modified the README text. [e6bfd30a9e51] +2013-05-09 Kaz Sasa + + * src/main.c: Merged default into ifaddr. + [534ef4ef39ee] + 2013-05-08 Kaz Sasa - * src/ifaddr.c: - Changed the ifaddr initialization to be recursive. + * src/ifaddr.c: Changed the ifaddr initialization to be recursive. [5fcea9e3ab8b] 2013-05-03 Kaz Sasa - * src/llmnr_responder.c: - Backed out changeset: cd3934141824 + * src/llmnr_responder.c: Backed out changeset: cd3934141824 [6f93f3d6dc3b] - * src/llmnr_responder.c: - Changed the initialization of ifaddr to be recursive. + * src/llmnr_responder.c: Changed the initialization of ifaddr to be + recursive. [cd3934141824] - * src/llmnr_responder.c, src/main.c: - Moved the initialization of ifaddr to the main unit. + * src/llmnr_responder.c, src/main.c: Moved the initialization of + ifaddr to the main unit. [483bc64ee6ca] 2013-04-04 Kaz Sasa - * Makefile.am: - Added a hook to sign the SHA1SUM file for distribution. + * Makefile.am: Added a hook to sign the SHA1SUM file for distribution. [f1c430f86cdf] +2013-03-24 Kaz Sasa + + * Merge with unfinished. + [1f7319154a82] + 2013-03-23 Kaz Sasa - * README: - Modified the README file. + * README: Modified the README file. [3c036899e5cd] - * src/main.c: - Modified the signal handling code to fix issue #4. + * src/main.c: Modified the signal handling code to fix issue #4. [e704a599f93c] - * configure.ac: - Added options to AM_INIT_AUTOMAKE. + * Merge with default. + [15ec9056850d] + + * configure.ac: Merge with default. + [13b096e877d7] + + * configure.ac: Added options to AM_INIT_AUTOMAKE. [2b7d8caf44ca] - * Makefile.am: - Removed the definition of AUTOMAKE_OPTIONS. + * Makefile.am: Removed the definition of AUTOMAKE_OPTIONS. [4f05d867c972] - * NEWS: - Created a NEWS file. + * NEWS: Created a NEWS file. [560487c6d569] 2013-03-22 Kaz Sasa - * src/ifaddr.c: - Added code for the ifaddr unit (see issue #1). + * Merge with default. + [6ab6b45892be] + + * src/ifaddr.c: Added code for the ifaddr unit (see issue #1). [587ad14b27cb] +2013-03-21 Kaz Sasa + + * Merge with another branch. + [6a2822f736e8] + 2013-03-15 Kaz Sasa - * src/main.c: - Moved signal cleanup code (see issue #4). + * src/main.c: Moved signal cleanup code (see issue #4). [2a0d03d6b019] - * src/main.c: - Removed the SIGQUIT handler (see issue #4). Changed to call - llmnr_responder_finalize() explicitly. + * src/main.c: Removed the SIGQUIT handler (see issue #4). [b4233b4db491] 2013-03-14 Kaz Sasa - * configure.ac: - Added a check for a POSIX thread library. + * configure.ac: Added a check for a POSIX thread library. [18eb684398ad] - * src/main.c: - Added signal handlers (see issue #4). + * src/main.c: Added signal handlers (see issue #4). [66ffb06641b7] 2013-03-13 Kaz Sasa - * src/Makefile.am, src/llmnr.c, src/llmnr_responder.c: - Renamed llmnr.c to llmnr_responder.c. + * src/Makefile.am, src/llmnr.c, src/llmnr_responder.c: Renamed llmnr.c + to llmnr_responder.c. [39d0108cbfd0] - * AUTHORS: - Created the AUTHORS file. + * AUTHORS: Created the AUTHORS file. [470eb2449bc0] 2013-03-12 Kaz Sasa - * src/llmnr.c, src/llmnr.h: - Added code to terminate the responder loop. + * src/llmnr.c, src/llmnr.h: Added code to terminate the responder + loop. [ad791a9b9157] - * src/main.c: - Removed static keywords from array parameters. + * src/main.c: Removed static keywords from array parameters. [ef739d0b39fd] - * src/llmnr.c: - Corrected the return type of llmnr_receive_udp6(). + * src/llmnr.c: Corrected the return type of llmnr_receive_udp6(). [fa35dccfe2e7] - * ChangeLog: - Updated the ChangeLog file. + * ChangeLog: Updated the ChangeLog file. [689741415173] 2013-03-11 Kaz Sasa - * configure.ac: - Added a check for atexit(). + * configure.ac: Added a check for atexit(). [5796ea9357f6] - * src/ifaddr.c: - Recommits ifaddr.c with the new EOL conversion. + * src/ifaddr.c: Recommits ifaddr.c with the new EOL conversion. [2262b4eb8ecd] + * .hgeol: Created the .hgeol file for edit on Windows. + [dc21195b9e0f] + 2013-03-10 Kaz Sasa - * src/llmnr_responder.c: - Added initialization/finalization for the ifaddr unit. + * src/llmnr_responder.c: Added initialization/finalization for the + ifaddr unit. [208f26b6668a] 2013-03-09 Kaz Sasa - * INSTALL: - Added an INSTALL file. + * Merged another head. + [7fa5d2d8a0fa] + + * INSTALL: Added an INSTALL file. [e4627bac8c5e] - * src/llmnr.c, src/llmnr.h: - Modified llmnr_open_udp_socket(). + * src/llmnr.c, src/llmnr.h: Modified llmnr_open_udp_socket(). [4bbbc4cd9cb0] 2013-03-08 Kaz Sasa - * README: - Modified the README content. + * README: Modified the README content. [9e30d3091167] 2013-03-07 Kaz Sasa - * src/Makefile.am: - Added ifaddr.c and ifaddr.h to the Makefile (see issue #1). + * src/Makefile.am: Added ifaddr.c and ifaddr.h to the Makefile (see + issue #1). [0ed68db0f628] - * src/ifaddr.c, src/ifaddr.h: - Created new files (see issue #1). + * src/ifaddr.c, src/ifaddr.h: Created new files (see issue #1). [a2a304421b83] - * src/llmnr.c: - Added new inline function log_discarded. + * src/llmnr.c: Added new inline function log_discarded. [85edd224a73e] 2013-03-06 Kaz Sasa - * src/main.c: - Modified the main function aligned to the responder changes. + * src/main.c: Modified the main function aligned to the responder + changes. [8c850188d45a] - * src/llmnr.c, src/llmnr.h: - Removed the responder type. + * src/llmnr.c, src/llmnr.h: Removed the responder type. [3e70d2bb6031] - * src/llmnr.c: - Added a function to receive a UDPv6 packet. + * src/llmnr.c: Added a function to receive a UDPv6 packet. [e67f1354fc15] 2013-03-05 Kaz Sasa - * src/main.c: - Modified declarations of pointer parameters. + * src/main.c: Modified declarations of pointer parameters. [6871874ed880] - * src/llmnr.c: - Fixed a comparison between signed and unsigned values. + * src/llmnr.c: Fixed a comparison between signed and unsigned values. [12bf12c66104] 2013-03-04 Kaz Sasa - * Makefile.am: - Added the new manual page to the Makefile. + * Makefile.am: Added the new manual page to the Makefile. [9d54c538afa9] - * configure.ac: - Added the new manual page to the configure output files (fixes issue - #3). + * configure.ac: Added the new manual page to the configure output + files (fixes issue #3). [f829eca18066] - * xllmnrd.8.in: - Created a manual page (see issue #3). + * xllmnrd.8.in: Created a manual page (see issue #3). [835dd50d2b7c] 2013-03-03 Kaz Sasa - * Makefile.am: - Added the dist-hook target. + * Makefile.am: Added the dist-hook target. [8730f7b6975c] - * configure.ac: - Added the URL for the package home page. + * configure.ac: Added the URL for the package home page. [ac736ebe23da] - * configure.ac: - Updated configure checks. + * configure.ac: Updated configure checks. [897611f74ba2] - * src/main.c: - Implemented command line options (fixes issue #5). + * src/main.c: Implemented command line options (fixes issue #5). [79791519508a] - * src/main.c: - Modified comments. + * src/main.c: Modified comments. [73a2aaf5ba28] - * src/Makefile.am: - Changed to sbin_PROGRAMS. + * src/Makefile.am: Changed to sbin_PROGRAMS. [2e3a4a79c09a] - * src/Makefile.am: - Added llmnr_header.h to noinst_HEADERS. + * src/Makefile.am: Added llmnr_header.h to noinst_HEADERS. [46d0e3101e4b] - * src/llmnr.c: - Added code to check received packets. + * src/llmnr.c: Added code to check received packets. [f60f6cb9252e] 2013-03-02 Kaz Sasa - * src/llmnr_header.h: - Added a header structure for LLMNR packets. + * src/llmnr_header.h: Added a header structure for LLMNR packets. [a374b64ab95d] - * src/llmnr.c: - Added new function llmnr_decode_cmsg. + * src/llmnr.c: Added new function llmnr_decode_cmsg. [aea51bcd70b3] 2013-02-26 Kaz Sasa - * ChangeLog: - Added ChangeLog. + * ChangeLog: Added ChangeLog. [d8de056d93dd] 2013-02-25 Kaz Sasa - * src/main.c: - Added a call to openlog. + * src/main.c: Added a call to openlog. [8a5809c966d8] - * src/main.c: - Changed to use the new responder type. Removed unnecessary includes. + * src/main.c: Changed to use the new responder type. [6f7d2ed1e0bb] 2013-02-21 Kaz Sasa - * src/llmnr.c, src/llmnr.h: - Added a new function. + * src/llmnr.c, src/llmnr.h: Added a new function. [6a4f660348b9] - * configure.ac: - Added checks for configure. + * configure.ac: Added checks for configure. [920a0e8aef5f] 2013-02-18 Kaz Sasa - * src/llmnr.c: - Used a C99 designated initializer for in6addr_llmnr. + * src/llmnr.c: Used a C99 designated initializer for in6addr_llmnr. [301501d66594] - * README: - Created a README file. + * README: Created a README file. [fdc3b8c26e7e] 2013-02-17 Kaz Sasa - * src/llmnr.c, src/llmnr.h: - Added functions for responder objects. + * src/llmnr.c, src/llmnr.h: Added functions for responder objects. [b747d11789e8] - * src/llmnr.c, src/llmnr.h, src/main.c: - Renamed llmnr_new_udp_socket. + * src/llmnr.c, src/llmnr.h, src/main.c: Renamed llmnr_new_udp_socket. [52fa3e5f24e6] + * .hgignore: Added stamp-h1 to .hgignore. + [ab1e7ff9c0a2] + 2013-02-14 Kaz Sasa - * configure.ac: - Added AC_PROG_CC_STDC. + * configure.ac: Added AC_PROG_CC_STDC. [93b74b649dcf] 2013-02-13 Kaz Sasa - * src/main.c: - Changed to use syslog to report errors. + * src/main.c: Changed to use syslog to report errors. [286394c534f5] - * src/llmnr.c, src/main.c: - Added #include "config.h". + * src/llmnr.c, src/main.c: Added #include "config.h". [d135ca24adcd] - * src/main.c: - Switched to foreground execution. + * src/main.c: Switched to foreground execution. [76f9aed30d21] - * src/llmnr.c: - Added a missing #include. + * src/llmnr.c: Added a missing #include. [837966d7a370] - * src/llmnr.c: - Added a pair of braces to ip6addr_llmnr to suppress warnings. + * src/llmnr.c: Added a pair of braces to ip6addr_llmnr to suppress + warnings. [a6ff4f8c8bfb] - * src/main.c: - Added a return statement to the main function. + * src/main.c: Added a return statement to the main function. [3f67b10e9667] 2013-02-08 Kaz Sasa - * src/Makefile.am: - Added the new file to Makefile.am. + * src/Makefile.am: Added the new file to Makefile.am. [56cd4e039b9b] - * src/llmnr.c, src/main.c: - Created a new file and moved llmnr_new_udp_socket. Also removed the - use of the SO_REUSEADDR option. + * src/llmnr.c, src/main.c: Created a new file and moved + llmnr_new_udp_socket. [1e6729888f7c] 2013-02-07 Kaz Sasa - * src/llmnr.h, src/main.c: - Added copyright notices. + * src/llmnr.h, src/main.c: Added copyright notices. [a539f2991143] - * COPYING: - Added the GNU GPL text. + * COPYING: Added the GNU GPL text. [7c968df7f8bd] 2013-02-04 Kaz Sasa - * configure.ac: - Added a configure.ac. + * configure.ac: Added a configure.ac. [97501f767473] - * Makefile.am, src/Makefile.am: - Added Makefile.am's. + * Makefile.am, src/Makefile.am: Added Makefile.am's. [2b2efbedb7d3] - * src/llmnr.h, src/main.c: - Added a new header. + * src/llmnr.h, src/main.c: Added a new header. [35396fd728c6] - * src/main.c: - Cleaned the program structure. + * src/main.c: Cleaned the program structure. [d13a2fc276ca] 2013-01-29 Kaz Sasa - * src/main.c: - Added a source file. + * src/main.c: Added a source file. [e280d8bd295e] + * .hgignore: Added .hgignore. + [fca01d2bf68c] + diff --git a/Makefile.am b/Makefile.am index a929c6b..d26fc54 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ ACLOCAL_AMFLAGS = -Im4 EXTRA_DIST = README.md m4/gnulib-cache.m4 -SUBDIRS = libgnu libxllmnrd src test lsb po +SUBDIRS = libgnu libxllmnrd xllmnrd test lsb po dist-hook: $(distdir)/SHA256SUMS if test -n "$$GPG_USERNAME"; then \ diff --git a/NEWS b/NEWS index 2bbc9af..03b47b8 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,12 @@ This file describes major changes and important notes for each release. +# Version 3.0 + + - This program has a new package name: Xenium LLMNR Responder. + + - The interface monitoring code has been re-implemented using C++ threads + and no longer has fixed limits in size of the internal tables. + # Version 2.0 This release adds a new feature and contains the source code of the GNU getopt diff --git a/README b/README deleted file mode 100644 index d0b021e..0000000 --- a/README +++ /dev/null @@ -1,20 +0,0 @@ -This directory contains the source code for XLLMNRD. - -XLLMNRD is an IPv6 LLMNR responder daemon (primarily for GNU/Linux operating -systems). It allows Microsoft Windows clients to get the IPv6 address of a -server on the same local network _without any DNS configuration_ and -effectively complements IPv4-only NetBIOS name resolution provided by Samba. - -XLLMNRD is free software: you can redistribute it and/or modify it under the -terms of the GNU General Public License. You should be able to find a copy of -it in the 'COPYING' file. - -For more information about XLLMNRD, visit . - -# Installation - -See the 'INSTALL' file for installation instructions. The 'configure' should -work for most GNU/Linux operating systems (distributions). - -If you find any problem while installation, please report it to -. diff --git a/README.md b/README.md index a0887ad..4b9014a 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,41 @@ -# Description +# Introduction -XLLMNRD is a [LLMNR][RFC 4795] responder daemon (primarily for GNU/Linux operating -systems). It allows Microsoft Windows clients to get the IPv6 addresses of a -server on the same local network _without any DNS configuration_ and -supplements IPv4-only NetBIOS name resolution typically provided by [Samba][]. +Xenium LLMNR Responder (xllmnrd) is an IPv6 network daemon that +responds to name queries from Microsoft Windows computers on the same network +link so that they can get the IPv6 addresses of the server _without any DNS +configuration_. It effectively supplements IPv4-only NetBIOS name resolution +typically provided by [Samba][]. -This program is provided under the terms and conditions of the [GNU General Public License, version 3][GPL-3.0] or any later version. +This program implements Link-Local Multicast Name Resolution (LLMNR) as +described in [RFC 4795][] and currently supports Linux-based operating systems +only. -See (and the [repository wiki][wiki]) for more information. - -[![(GNU General Public License v3.0 or later)](https://img.shields.io/badge/license-GPL--3.0--or--later-blue.svg)][GPL-3.0] -[![(Open Issues)](https://img.shields.io/bitbucket/issues/vx68k/xllmnrd.svg)][open issues] -[![(Build Status)](https://linuxfront-functions.azurewebsites.net/api/bitbucket/build/vx68k/xllmnrd?branch=master)][pipelines] +See the [home page][] for more information about this program. +[Home page]: https://www.vx68k.org/xllmnrd [RFC 4795]: https://tools.ietf.org/html/rfc4795 "Link-Local Multicast Name Resolution (LLMNR)" -[Samba]: -[GPL-3.0]: https://opensource.org/licenses/GPL-3.0 +[Samba]: https://www.samba.org/ + +[![(License)](https://img.shields.io/badge/license-GPL--3.0--or--later-blue.svg)][GPL-3.0] +[![(Open issues)](https://img.shields.io/bitbucket/issues/kazssym/xllmnrd.svg)][open issues] -[Wiki]: https://bitbucket.org/vx68k/xllmnrd/wiki -[Open issues]: https://bitbucket.org/vx68k/xllmnrd/issues?status=new&status=open -[Pipelines]: https://bitbucket.org/vx68k/xllmnrd/addon/pipelines/home +[Open issues]: https://bitbucket.org/kazssym/xllmnrd/issues?status=new&status=open # Installation See the 'INSTALL' file for installation instructions. The 'configure' should -work for most GNU/Linux operating systems (distributions). +work for most supported operating systems. If you find any problem while installation, please report it to -. +. + +# License + +This program is provided under the terms and conditions of the [GNU General +Public License, version 3][GPL-3.0] or any later version. + +[GPL-3.0]: https://opensource.org/licenses/GPL-3.0 + +# See also + + - [RFC 4795][]. diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b664d02..cf7ea50 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,7 +6,7 @@ # this notice are preserved. This file is offered as-is, without any warranty. --- variables: - package.distName: xllmnrd-3-alpha.2 + package.distName: xllmnrd-3.0 trigger: - master - release/* @@ -36,7 +36,7 @@ stages: libcppunit-dev displayName: Install build dependencies - bash: | - autoreconf --install + autoreconf displayName: Bootstrap - bash: | ./configure --disable-static @@ -48,10 +48,10 @@ stages: condition: succeededOrFailed() - bash: | make dist || exit $? - mkdir -p dist - mv -f '$(package.distName)'.* dist/ + mkdir -p _dist + mv -f '$(package.distName)'.* _dist/ displayName: Make source archive - - publish: dist + - publish: _dist artifact: dist - stage: Test jobs: diff --git a/configure.ac b/configure.ac index e9c397b..4fbac72 100644 --- a/configure.ac +++ b/configure.ac @@ -1,44 +1,40 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([XLLMNRD], [3-alpha.2], +AC_INIT([Xenium LLMNR Responder], [3.0], [https://bitbucket.org/kazssym/xllmnrd/issues/new], [xllmnrd], [https://www.vx68k.org/xllmnrd]) -AC_CONFIG_SRCDIR([src/responder.cpp]) +AC_CONFIG_SRCDIR([xllmnrd/responder.cpp]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIRS([m4]) AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE([no-define]) +AM_INIT_AUTOMAKE([foreign no-define]) # Checks for programs. AC_PROG_CC AC_PROG_CXX +AC_DEFINE([_POSIX_C_SOURCE], [200809L], +[Define to 200809L to make the symbols required by POSIX.1-2008 visible.])dnl gl_EARLY # Checks for libraries. -AC_SEARCH_LIBS([pthread_create], [pthread]) +AC_SEARCH_LIBS([pthread_join], [pthread]) +AC_SEARCH_LIBS([atomic_flag_test_and_set], [atomic]) # Checks for header files. -AC_DEFINE([_POSIX_C_SOURCE], [200809L], -[Define to 200809L to make the symbols required by IEEE Std 1003.1-2008 \ -visible if available.])dnl -AC_HEADER_STDBOOL -AC_CHECK_HEADERS([arpa/inet.h libgen.h linux/rtnetlink.h netinet/in.h \ -net/if.h syslog.h sys/socket.h]) -AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.19.3]) +AC_CHECK_HEADERS([arpa/inet.h libgen.h netinet/in.h net/if.h syslog.h sys/socket.h]) +AC_CHECK_HEADERS([linux/rtnetlink.h]) gl_INIT # Checks for typedefs, structures, and compiler characteristics. dnl 'AC_C_INLINE' was omitted as 'inline' is now standard in C99 and C++. dnl Note: on the other hand, 'restrict' is not standard in C++ yet. AC_C_RESTRICT AC_TYPE_SSIZE_T -AC_TYPE_UINT8_T -AC_TYPE_UINT16_T -AC_TYPE_UINT32_T # Checks for library functions. dnl 'AC_FUNC_MALLOC' and 'AC_FUNC_REALLOC' were omitted as only the standard dnl behavior is used. AC_CHECK_FUNCS([basename daemon gethostname socket]) +AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT_VERSION([0.19.3]) PKG_CHECK_MODULES([CPPUNIT], [cppunit],, [no_cppunit=yes]) AM_CONDITIONAL([CPPUNIT], [test "$no_cppunit" != yes]) # Configuration actions. -AC_CONFIG_FILES([Makefile src/Makefile libxllmnrd/Makefile test/Makefile -lsb/Makefile libgnu/Makefile po/Makefile.in]) +AC_CONFIG_FILES([Makefile xllmnrd/Makefile libxllmnrd/Makefile libgnu/Makefile +test/Makefile lsb/Makefile po/Makefile.in]) AC_OUTPUT diff --git a/libxllmnrd/Makefile.am b/libxllmnrd/Makefile.am index 947ab07..11867f9 100644 --- a/libxllmnrd/Makefile.am +++ b/libxllmnrd/Makefile.am @@ -3,6 +3,6 @@ AM_CPPFLAGS = -I$(top_builddir)/libgnu -I$(top_srcdir)/libgnu noinst_LIBRARIES = libxllmnrd.a -noinst_HEADERS = rtnetlink.h ifaddr.h posix.h ascii.h +noinst_HEADERS = interface.h rtnetlink.h ifaddr.h posix.h ascii.h -libxllmnrd_a_SOURCES = rtnetlink.cpp ifaddr.cpp posix.cpp +libxllmnrd_a_SOURCES = interface.cpp rtnetlink.cpp ifaddr.cpp posix.cpp diff --git a/libxllmnrd/ifaddr.cpp b/libxllmnrd/ifaddr.cpp index ca41582..ca9a22d 100644 --- a/libxllmnrd/ifaddr.cpp +++ b/libxllmnrd/ifaddr.cpp @@ -28,6 +28,7 @@ #include "ifaddr.h" +#include "rtnetlink.h" #if HAVE_LINUX_RTNETLINK_H #include #endif @@ -49,10 +50,13 @@ // TODO: Remove the original C-based code finally. #ifndef IFADDR_CPLUSPLUS -#define IFADDR_CPLUSPLUS 0 +#define IFADDR_CPLUSPLUS 1 #endif -using namespace xllmnrd; +using xllmnrd::interface_change_event; +using xllmnrd::interface_change_handler; +using xllmnrd::rtnetlink_interface_manager; +using namespace std; /** * Terminates the program abnormally if an error is detected. @@ -110,7 +114,6 @@ static inline int open_rtnetlink(int *restrict fd_out) { } return err; } -#endif /** * Interface record. @@ -130,10 +133,6 @@ struct ifaddr_interface { } }; -#if IFADDR_CPLUSPLUS -// Pointer to the static interface address manager if initialized. -static shared_ptr manager; -#else /** * True if this module has been initialized. */ @@ -149,7 +148,6 @@ static int interrupt_signo; * File descriptor for the rtnetlink socket. */ static int rtnetlink_fd; -#endif /** * Mutex for the interface table. @@ -159,7 +157,7 @@ static pthread_mutex_t if_mutex; /** * Pointer to the interface change handler. */ -static ifaddr_change_handler if_change_handler; +static interface_change_handler if_change_handler; /** * Table of interfaces. @@ -189,15 +187,22 @@ static bool refresh_not_in_progress; */ static bool started; -#if !IFADDR_CPLUSPLUS /** * Identifier for the worker thread. */ static pthread_t worker_thread; static volatile sig_atomic_t terminated; -#endif +#else +// Pointer to the static interface address manager if initialized. +static shared_ptr manager; +#endif /* IFADDR_CPLUSPLUS */ +/* + * Declarations for static functions. + */ + +#if !IFADDR_CPLUSPLUS /** * Adds an IPv4 address to an interface. * @param __index interface index. @@ -230,11 +235,6 @@ static void ifaddr_add_addr_v6(unsigned int __index, static void ifaddr_remove_addr_v6(unsigned int __index, const struct in6_addr *__addr); -/* - * Declarations for static functions. - */ - -#if !IFADDR_CPLUSPLUS static void *ifaddr_run(void *__data); /** @@ -249,7 +249,6 @@ static void ifaddr_decode_nlmsg(const struct nlmsghdr *__nlmsg, size_t __len); * @param __nlmsg pointer to the netlink message */ static void ifaddr_handle_ifaddrmsg(const struct nlmsghdr *__nlmsg); -#endif /** * Handles a sequence of RTNETLINK attributes for an IPv4 ifaddrmsg. @@ -270,20 +269,18 @@ static void ifaddr_v4_handle_rtattrs(unsigned int __nlmsg_type, */ static void ifaddr_v6_handle_rtattrs(unsigned int __nlmsg_type, unsigned int __index, const struct rtattr *__rta, size_t __rta_size); +#endif /* * Definitions for in-line functions. */ +#if !IFADDR_CPLUSPLUS /** * Returns non-zero if this module has been initialized. */ static inline bool ifaddr_initialized(void) { -#if IFADDR_CPLUSPLUS - return bool(manager); -#else return initialized; -#endif } /** @@ -365,42 +362,19 @@ static inline void ifaddr_complete_refresh(void) { unlock_mutex(&refresh_mutex); } - -ifaddr_manager::ifaddr_manager(shared_ptr os) - : os(os) { -} - -ifaddr_manager::~ifaddr_manager() noexcept { -} - -void ifaddr_manager::set_change_handler(ifaddr_change_handler change_handler, - ifaddr_change_handler *old_change_handler) { - lock_guard lock(object_mutex); - - if (old_change_handler) { - *old_change_handler = this->change_handler; - } - this->change_handler = change_handler; -} +#endif /* !IFADDR_CPLUSPLUS */ /* * Definitions for out-of-line functions. */ -int ifaddr_initialize(int sig) { +int ifaddr_initialize(int sig) +{ +#if !IFADDR_CPLUSPLUS if (ifaddr_initialized()) { return EBUSY; } -#if IFADDR_CPLUSPLUS - try { - manager = make_shared(); - } catch (const system_error &error) { - return error.code().value(); - } - - return 0; -#else interrupt_signo = sig; if_change_handler = NULL; interfaces_size = 0; @@ -431,13 +405,25 @@ int ifaddr_initialize(int sig) { } } return err; +#else + if (manager) { + return EBUSY; + } + + try { + manager = make_shared(); + } + catch (const system_error &error) { + return error.code().value(); + } + + return 0; #endif } -void ifaddr_finalize(void) { -#if IFADDR_CPLUSPLUS - manager.reset(); -#else +void ifaddr_finalize(void) +{ +#if !IFADDR_CPLUSPLUS if (ifaddr_initialized()) { initialized = false; @@ -461,18 +447,19 @@ void ifaddr_finalize(void) { strerror(errno)); } } +#else + manager.reset(); #endif } -int ifaddr_set_change_handler(ifaddr_change_handler handler, - ifaddr_change_handler *old_handler_out) { +int ifaddr_set_change_handler(interface_change_handler handler, + interface_change_handler *old_handler_out) +{ +#if !IFADDR_CPLUSPLUS if (!ifaddr_initialized()) { return ENXIO; } -#if IFADDR_CPLUSPLUS - manager->set_change_handler(handler, old_handler_out); -#else lock_mutex(&if_mutex); if (old_handler_out) { @@ -481,11 +468,21 @@ int ifaddr_set_change_handler(ifaddr_change_handler handler, if_change_handler = handler; unlock_mutex(&if_mutex); +#else + if (!manager) { + return ENXIO; + } + + auto &&old_handler = manager->set_interface_change(handler); + if (old_handler_out) { + *old_handler_out = old_handler; + } #endif return 0; } +#if !IFADDR_CPLUSPLUS void ifaddr_add_addr_v4(unsigned int index, const struct in_addr *restrict addr) { lock_mutex(&if_mutex); @@ -591,7 +588,7 @@ void ifaddr_add_addr_v6(unsigned int index, } if (addr_v6) { if (i->addr_v6_size == 0 && if_change_handler) { - ifaddr_change change = {ifaddr_change::ADDED, index}; + interface_change_event change = {interface_change_event::ADDED, index}; (*if_change_handler)(&change); } @@ -633,7 +630,7 @@ void ifaddr_remove_addr_v6(unsigned int index, i->addr_v6_size -= 1; if (i->addr_v6_size == 0 && if_change_handler) { - ifaddr_change change = {ifaddr_change::REMOVED, index}; + interface_change_event change = {interface_change_event::REMOVED, index}; (*if_change_handler)(&change); } @@ -652,21 +649,15 @@ void ifaddr_remove_addr_v6(unsigned int index, unlock_mutex(&if_mutex); } +#endif /* !IFADDR_CPLUSPLUS */ -int ifaddr_start(void) { +int ifaddr_start(void) +{ +#if !IFADDR_CPLUSPLUS if (!ifaddr_initialized()) { return ENXIO; } -#if IFADDR_CPLUSPLUS - try { - manager->start(); - } catch (const system_error &error) { - return error.code().value(); - } - - return 0; -#else int err = 0; if (!ifaddr_started()) { terminated = false; @@ -691,6 +682,18 @@ int ifaddr_start(void) { } } return err; +#else + if (!manager) { + return ENXIO; + } + + try { + manager->start(); + } catch (const system_error &error) { + return error.code().value(); + } + + return 0; #endif } @@ -711,7 +714,7 @@ void *ifaddr_run(void *data) { return data; } } else { - std::vector buf(recv_size); + vector buf(recv_size); ssize_t recv_len = recv(rtnetlink_fd, buf.data(), recv_size, 0); if (recv_len >= 0) { const struct nlmsghdr *nlmsg = (struct nlmsghdr *) buf.data(); @@ -802,7 +805,6 @@ void ifaddr_handle_ifaddrmsg(const struct nlmsghdr *const nlmsg) { } } } -#endif void ifaddr_v4_handle_rtattrs(unsigned int nlmsg_type, unsigned int index, const struct rtattr *restrict rta, size_t rta_size) { @@ -849,21 +851,12 @@ void ifaddr_v6_handle_rtattrs(unsigned int nlmsg_type, unsigned int index, rta = RTA_NEXT(rta, rta_size); } } +#endif -int ifaddr_refresh(void) { - if (!ifaddr_initialized()) { - return ENXIO; - } - -#if IFADDR_CPLUSPLUS - try { - manager->refresh(); - } catch (const system_error &error) { - return error.code().value(); - } - return 0; -#else - if (!ifaddr_started()) { +int ifaddr_refresh(void) +{ +#if !IFADDR_CPLUSPLUS + if (!ifaddr_initialized() || !ifaddr_started()) { return ENXIO; } @@ -913,12 +906,26 @@ int ifaddr_refresh(void) { unlock_mutex(&refresh_mutex); return err; +#else + if (!manager || not(manager->running())) { + return ENXIO; + } + + try { + manager->refresh(); + } catch (const system_error &error) { + return error.code().value(); + } + + return 0; #endif } int ifaddr_lookup_v6(unsigned int index, size_t addr_size, // Using 'struct in6_addr addr[restrict]' caused an error on CLang. - struct in6_addr *restrict addr, size_t *number_of_addresses) { + struct in6_addr *restrict addr, size_t *number_of_addresses) +{ +#if !IFADDR_CPLUSPLUS if (!ifaddr_initialized() || !ifaddr_started()) { return ENXIO; } @@ -946,4 +953,25 @@ int ifaddr_lookup_v6(unsigned int index, size_t addr_size, unlock_mutex(&if_mutex); return err; +#else + if (!manager || not(manager->running())) { + return ENXIO; + } + + auto &&addresses = manager->in6_addresses(index); + if (addresses.empty()) { + return ENODEV; + } + + auto &&addr_end = addr + addr_size; + for (auto &&i = addresses.begin(); i != addresses.end(); i++) { + if (addr == addr_end) { + break; + } + *addr++ = *i; + } + *number_of_addresses = addresses.size(); + + return 0; +#endif } diff --git a/libxllmnrd/ifaddr.h b/libxllmnrd/ifaddr.h index 0987cc8..01fa9b4 100644 --- a/libxllmnrd/ifaddr.h +++ b/libxllmnrd/ifaddr.h @@ -19,7 +19,7 @@ #ifndef IFADDR_H #define IFADDR_H 1 -#include +#include "interface.h" #include #include #include @@ -37,68 +37,6 @@ #define END_C_LINKAGE #endif -struct nlmsghdr; - -namespace xllmnrd { - - using namespace std; - - // Interface address change. - struct ifaddr_change { - - enum change_type { - ADDED, - REMOVED, - }; - - change_type type; - unsigned int ifindex; - }; - - // Pointer to the interface address change handler. - typedef void (*ifaddr_change_handler)(const ifaddr_change *); - - // Abstract interface address manager. - class ifaddr_manager { - public: - - // Constructs this object. - // interrupt_signal is the signal number used to interrupt - // blocking system calls and its handler is expected to do nothing. - explicit ifaddr_manager(shared_ptr os = make_shared()); - - // Destructs this object and cleans up the allocated resources. - virtual ~ifaddr_manager() noexcept; - - // Set the interface address change handler that is called on each - // interface address change. - // - // This function is thread-safe. - void set_change_handler(ifaddr_change_handler change_handler, - ifaddr_change_handler *old_change_handler = nullptr); - - // Refreshes the interface addresses. - // - // This function is thread safe. - virtual void refresh() = 0; - - // Starts the worker threads that monitors interface address changes. - // This function does nothing if no worker threads are needed. - // - // This function is thread-safe. - virtual void start() { - } - - protected: - const shared_ptr os; - - private: - recursive_mutex object_mutex; - - ifaddr_change_handler change_handler = nullptr; - }; -} - BEGIN_C_LINKAGE /** @@ -122,8 +60,9 @@ extern void ifaddr_finalize(void); * value is null, no output will be retrieved. * @return 0 if no error is detected, or any non-zero error number. */ -extern int ifaddr_set_change_handler(xllmnrd::ifaddr_change_handler __handler, - xllmnrd::ifaddr_change_handler *__old_handler); +extern int ifaddr_set_change_handler( + xllmnrd::interface_change_handler __handler, + xllmnrd::interface_change_handler *__old_handler); /** * Starts the internal worker thread. diff --git a/libxllmnrd/interface.cpp b/libxllmnrd/interface.cpp new file mode 100644 index 0000000..f2d63fe --- /dev/null +++ b/libxllmnrd/interface.cpp @@ -0,0 +1,243 @@ +/* + * interface.cpp + * Copyright (C) 2013-2020 Kaz Nishimura + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#if HAVE_CONFIG_H +#include +#endif + +#include "interface.h" + +#include +#include +#include +#include +#include +#include + +using namespace xllmnrd; + +/* + * Methods of the 'std::less' specializations. + */ + +bool std::less::operator ()( + const struct in_addr &x, const struct in_addr &y) const +{ + return std::memcmp(&x, &y, sizeof (struct in_addr)) < 0; +} + +bool std::less::operator ()( + const struct in6_addr &x, const struct in6_addr &y) const +{ + return std::memcmp(&x, &y, sizeof (struct in6_addr)) < 0; +} + +interface_manager::interface_manager() +{ +} + +interface_manager::~interface_manager() +{ + remove_interfaces(); +} + +interface_change_handler interface_manager::set_interface_change( + const interface_change_handler interface_change) +{ + return this->_interface_change.exchange(interface_change); +} + +void interface_manager::fire_interface_change( + const interface_change_event *const event) +{ + auto &&handler = _interface_change.load(); + if (handler != nullptr) { + handler(event); + } +} + +std::set interface_manager::in_addresses( + const unsigned int index) const +{ + std::lock_guard lock(_interfaces_mutex); + + auto &&found = _interfaces.find(index); + if (found != _interfaces.end()) { + return found->second.in_addresses; + } + + return std::set(); +} + +std::set interface_manager::in6_addresses( + const unsigned int index) const +{ + std::lock_guard lock(_interfaces_mutex); + + auto &&found = _interfaces.find(index); + if (found != _interfaces.end()) { + return found->second.in6_addresses; + } + + return std::set(); +} + +void interface_manager::remove_interfaces() +{ + std::lock_guard lock {mutex()}; + + std::for_each(_interfaces.begin(), _interfaces.end(), + [this](decltype(_interfaces)::reference i) { + if (i.second.in6_addresses.size() != 0) { + interface_change_event event { + interface_change_event::REMOVED, i.first, AF_INET6}; + fire_interface_change(&event); + } + if (i.second.in_addresses.size() != 0) { + interface_change_event event { + interface_change_event::REMOVED, i.first, AF_INET}; + fire_interface_change(&event); + } + }); + + _interfaces.clear(); +} + +void interface_manager::add_interface_address(unsigned int index, + int family, const void *address, std::size_t address_size) +{ + char interface_name[IF_NAMESIZE]; + if_indextoname(index, interface_name); + + std::lock_guard lock {mutex()}; + + switch (family) { + case AF_INET: + if (address_size >= sizeof (struct in_addr)) { + auto &addresses = _interfaces[index].in_addresses; + auto &&inserted = addresses.insert( + *static_cast(address)); + + if (inserted.second && addresses.size() == 1) { + interface_change_event event { + interface_change_event::ADDED, index, AF_INET}; + fire_interface_change(&event); + } + + char ipv4[INET_ADDRSTRLEN]; + inet_ntop(AF_INET, address, ipv4, INET_ADDRSTRLEN); + syslog(LOG_DEBUG, "Added an IPv4 address %s on %s", ipv4, + interface_name); + } + else { + syslog(LOG_INFO, "Ignored a short IPv4 address (size = %zu) on %s", + address_size, interface_name); + } + break; + + case AF_INET6: + if (address_size >= sizeof (struct in6_addr)) { + auto &addresses = _interfaces[index].in6_addresses; + auto &&inserted = addresses.insert( + *static_cast(address)); + + if (inserted.second && addresses.size() == 1) { + interface_change_event event { + interface_change_event::ADDED, index, AF_INET6}; + fire_interface_change(&event); + } + + char ipv6[INET6_ADDRSTRLEN]; + inet_ntop(AF_INET6, address, ipv6, INET6_ADDRSTRLEN); + syslog(LOG_DEBUG, "Added an IPv6 address %s on %s", ipv6, + interface_name); + } + else { + syslog(LOG_INFO, "Ignored a short IPv6 address (size = %zu) on %s", + address_size, interface_name); + } + break; + + default: + syslog(LOG_INFO, "Ignored an address of unknown family %d on %s", + family, interface_name); + break; + } +} + +void interface_manager::remove_interface_address(unsigned int index, + int family, const void *address, std::size_t address_size) +{ + char interface_name[IF_NAMESIZE]; + if_indextoname(index, interface_name); + + std::lock_guard lock {mutex()}; + + switch (family) { + case AF_INET: + if (address_size >= sizeof (struct in_addr)) { + auto &addresses = _interfaces[index].in_addresses; + auto &&erased = addresses.erase( + *static_cast(address)); + + if (erased != 0 && addresses.empty()) { + interface_change_event event { + interface_change_event::REMOVED, index, AF_INET}; + fire_interface_change(&event); + } + + char ipv4[INET_ADDRSTRLEN]; + inet_ntop(AF_INET, address, ipv4, INET_ADDRSTRLEN); + syslog(LOG_DEBUG, "Removed an IPv4 address %s on %s", ipv4, + interface_name); + } + else { + syslog(LOG_INFO, "Ignored a short IPv4 address (size = %zu) on %s", + address_size, interface_name); + } + break; + + case AF_INET6: + if (address_size >= sizeof (struct in6_addr)) { + auto &addresses = _interfaces[index].in6_addresses; + auto &&erased = addresses.erase( + *static_cast(address)); + + if (erased != 0 && addresses.empty()) { + interface_change_event event { + interface_change_event::REMOVED, index, AF_INET6}; + fire_interface_change(&event); + } + + char ipv6[INET6_ADDRSTRLEN]; + inet_ntop(AF_INET6, address, ipv6, INET6_ADDRSTRLEN); + syslog(LOG_DEBUG, "Removed an IPv6 address %s on %s", ipv6, + interface_name); + } + else { + syslog(LOG_INFO, "Ignored a short IPv6 address (size = %zu) on %s", + address_size, interface_name); + } + break; + + default: + syslog(LOG_INFO, "Ignored an address of unknown family %d on %s", + family, interface_name); + break; + } +} diff --git a/libxllmnrd/interface.h b/libxllmnrd/interface.h new file mode 100644 index 0000000..d710679 --- /dev/null +++ b/libxllmnrd/interface.h @@ -0,0 +1,170 @@ +/* + * interface.h + * Copyright (C) 2013-2020 Kaz Nishimura + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef INTERFACE_H +#define INTERFACE_H 1 + +#include "posix.h" +#include +#include +#include +#include +#include +#include + +/* + * Specializations of 'std::less'. + */ + +template <> +struct std::less +{ + bool operator ()(const struct in_addr &x, const struct in_addr &y) const; +}; + +template <> +struct std::less +{ + bool operator ()(const struct in6_addr &x, const struct in6_addr &y) const; +}; + +namespace xllmnrd +{ + using std::size_t; + + /// Interface change event class. + struct interface_change_event + { + enum event_type: int + { + REMOVED, + ADDED, + }; + + event_type type; + unsigned int interface_index; + int address_family; + + constexpr interface_change_event(event_type type, + unsigned int interface_index, int address_family = AF_UNSPEC) + : + type {type}, + interface_index {interface_index}, + address_family {address_family} + {} + }; + + // Pointer to an interface change handler. + typedef void (*interface_change_handler)(const interface_change_event *); + + /// Abstract interface manager class. + class interface_manager + { + protected: + struct interface + { + std::set in_addresses; + std::set in6_addresses; + + /// Returns true if no address is stored, false otherwise. + bool empty() const + { + return in_addresses.empty() && in6_addresses.empty(); + } + }; + + private: + /// Interface change handler. + std::atomic _interface_change {nullptr}; + + private: + /// Map from interface indices to interfaces. + std::unordered_map _interfaces; + + private: + mutable std::recursive_mutex _interfaces_mutex; + + protected: + /// Constructs an interface manager. + interface_manager(); + + // The copy constructor is deleted. + interface_manager(const interface_manager &) = delete; + + // The copy assignment operator is deleted. + void operator =(const interface_manager &) = delete; + + public: + /// Destructs an interface manager. + virtual ~interface_manager(); + + public: + /// Set the interface change handler. + /// + /// This function is thread-safe. + interface_change_handler set_interface_change( + interface_change_handler interface_change); + + /** + * Returns a copy of the IPv4 addresses of an interface. + * + * This function is thread-safe. + * + * @param {unsigned int} index an interface index + * @return a copy of the IPv4 addresses of the interface + */ + std::set in_addresses(unsigned int index) const; + + /** + * Returns a copy of the IPv6 addresses of an interface. + * + * This function is thread-safe. + * + * @param {unsigned int} index an interface index + * @return a copy of the IPv6 addresses of the interface + */ + std::set in6_addresses(unsigned int index) const; + + // Refreshes the interface addresses. + // + // This function is thread safe. + virtual void refresh(bool maybe_asynchronous = false) = 0; + + protected: + /// Returns the reference to the mutex object. + std::recursive_mutex &mutex() const + { + return _interfaces_mutex; + } + + /// Removes all the interfaces. + void remove_interfaces(); + + void add_interface_address(unsigned int index, int family, + const void *address, size_t address_size); + + void remove_interface_address(unsigned int index, int family, + const void *address, size_t address_size); + + private: + // Fires an interace change event. + void fire_interface_change(const interface_change_event *event); + }; +} + +#endif diff --git a/libxllmnrd/posix.cpp b/libxllmnrd/posix.cpp index cb9731f..7cb3f3b 100644 --- a/libxllmnrd/posix.cpp +++ b/libxllmnrd/posix.cpp @@ -1,6 +1,6 @@ /* - * posix - POSIX class (implementation) - * Copyright (C) 2013-2015 Kaz Nishimura + * posix.cpp + * Copyright (C) 2013-2020 Kaz Nishimura * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free @@ -18,26 +18,38 @@ #if HAVE_CONFIG_H #include #endif -#undef _GNU_SOURCE #include "posix.h" -#include "sys/socket.h" -#include "unistd.h" +#include using namespace xllmnrd; -posix::~posix() { +posix::~posix() +{ } -int posix::socket(int domain, int type, int protocol) { +int posix::socket(int domain, int type, int protocol) +{ return ::socket(domain, type, protocol); } -int posix::bind(int fd, const sockaddr *addr, socklen_t len) { +int posix::bind(int fd, const sockaddr *addr, socklen_t len) +{ return ::bind(fd, addr, len); } -int posix::close(int fd) { +int posix::close(int fd) +{ return ::close(fd); } + +ssize_t posix::recv(int fd, void *buf, ::size_t n, int flags) +{ + return ::recv(fd, buf, n, flags); +} + +ssize_t posix::send(int fd, const void *buf, ::size_t n, int flags) +{ + return ::send(fd, buf, n, flags); +} diff --git a/libxllmnrd/posix.h b/libxllmnrd/posix.h index eb0ebdd..c574ecd 100644 --- a/libxllmnrd/posix.h +++ b/libxllmnrd/posix.h @@ -1,6 +1,6 @@ /* - * posix - POSIX class (interface) - * Copyright (C) 2013-2015 Kaz Nishimura + * posix.h + * Copyright (C) 2013-2020 Kaz Nishimura * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free @@ -21,15 +21,27 @@ #include -namespace xllmnrd { - - class posix { +namespace xllmnrd +{ + class posix + { public: virtual ~posix(); + public: virtual int socket(int domain, int type, int protocol); virtual int bind(int fd, const struct sockaddr *addr, socklen_t len); virtual int close(int fd); + + /// Receives a message from a socket. + /// + /// This implementations calls '::recv'. + virtual ssize_t recv(int fd, void *buf, ::size_t n, int flags); + + /// Send a message to a socket. + /// + /// This implementation calls '::send'. + virtual ssize_t send(int fd, const void *buf, ::size_t n, int flags); }; } diff --git a/libxllmnrd/rtnetlink.cpp b/libxllmnrd/rtnetlink.cpp index 425e16b..8efc30c 100644 --- a/libxllmnrd/rtnetlink.cpp +++ b/libxllmnrd/rtnetlink.cpp @@ -22,7 +22,7 @@ #include "rtnetlink.h" -#if HAVE_LINUX_RTNETLINK_H +#if XLLMNRD_RTNETLINK #include #include /* if_indextoname */ @@ -35,9 +35,10 @@ using namespace xllmnrd; -int rtnetlink_ifaddr_manager::open_rtnetlink(const std::shared_ptr &os) +int rtnetlink_interface_manager::open_rtnetlink( + const std::shared_ptr &os) { - int rtnetlink = os->socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); + int &&rtnetlink = os->socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if (rtnetlink < 0) { throw std::runtime_error(std::strerror(errno)); } @@ -50,7 +51,7 @@ int rtnetlink_ifaddr_manager::open_rtnetlink(const std::shared_ptr &os) RTMGRP_IPV4_IFADDR | RTMGRP_IPV6_IFADDR, // .nl_groups }; - auto result = os->bind(rtnetlink, + auto &&result = os->bind(rtnetlink, reinterpret_cast(&address), sizeof (struct sockaddr_nl)); if (result < 0) { @@ -65,136 +66,137 @@ int rtnetlink_ifaddr_manager::open_rtnetlink(const std::shared_ptr &os) return rtnetlink; } -rtnetlink_ifaddr_manager::rtnetlink_ifaddr_manager() - : rtnetlink_ifaddr_manager(std::make_shared()) +rtnetlink_interface_manager::rtnetlink_interface_manager() +: + rtnetlink_interface_manager(std::make_shared()) { } -rtnetlink_ifaddr_manager::rtnetlink_ifaddr_manager( +rtnetlink_interface_manager::rtnetlink_interface_manager( const std::shared_ptr &os) - : ifaddr_manager(os), rtnetlink {open_rtnetlink(os)} +: + _os {os}, _rtnetlink {open_rtnetlink(_os)} { } -rtnetlink_ifaddr_manager::~rtnetlink_ifaddr_manager() +rtnetlink_interface_manager::~rtnetlink_interface_manager() { stop(); - auto result = os->close(rtnetlink); + auto result = _os->close(_rtnetlink); if (result < 0) { syslog(LOG_ERR, "Failed to close the RTNETLINK socket: %s", strerror(errno)); } } -void rtnetlink_ifaddr_manager::finish_refresh() -{ - unique_lock lock(refresh_mutex); - - refresh_in_progress = false; - refresh_finished.notify_all(); -} - -void rtnetlink_ifaddr_manager::run() +void rtnetlink_interface_manager::run() { - while (!worker_stopped) { - receive_netlink(rtnetlink, &worker_stopped); + while (_worker_running) { + process_messages(); } } -void rtnetlink_ifaddr_manager::receive_netlink(int fd, - volatile atomic_bool *stopped) +void rtnetlink_interface_manager::process_messages() { // Gets the required buffer size. - ssize_t recv_size = recv(fd, NULL, 0, MSG_PEEK | MSG_TRUNC); - if (!stopped || !*stopped) { - if (recv_size < 0) { + auto &&size = _os->recv(_rtnetlink, nullptr, 0, MSG_PEEK | MSG_TRUNC); + if (size != 0) { + if (size < 0) { syslog(LOG_ERR, "Failed to recv from RTNETLINK: %s", strerror(errno)); - throw system_error(errno, generic_category()); + throw std::system_error(errno, std::generic_category()); } - vector buffer(recv_size); + std::unique_ptr buffer {new char [size]}; // This must not block. - recv_size = recv(fd, buffer.data(), recv_size, 0); - if (recv_size < 0) { + size = _os->recv(_rtnetlink, buffer.get(), size, 0); + if (size < 0) { syslog(LOG_ERR, "Failed to recv from RTNETLINK: %s", strerror(errno)); - throw system_error(errno, generic_category()); + throw std::system_error(errno, std::generic_category()); } - decode_nlmsg(buffer.data(), recv_size); + dispatch_messages(buffer.get(), size); } } -void rtnetlink_ifaddr_manager::decode_nlmsg(const void *data, size_t size) +void rtnetlink_interface_manager::dispatch_messages(const void *messages, + size_t size) { - auto nlmsg = static_cast(data); - - while (NLMSG_OK(nlmsg, size)) { + auto &&message = static_cast(messages); + while (NLMSG_OK(message, size)) { bool done = false; - switch (nlmsg->nlmsg_type) { + switch (message->nlmsg_type) { case NLMSG_NOOP: syslog(LOG_INFO, "Got NLMSG_NOOP"); break; case NLMSG_ERROR: - handle_nlmsgerr(nlmsg); + handle_error(message); break; case NLMSG_DONE: - finish_refresh(); + handle_done(); done = true; break; case RTM_NEWADDR: case RTM_DELADDR: - handle_ifaddrmsg(nlmsg); + handle_ifaddrmsg(message); break; default: syslog(LOG_DEBUG, "Unknown netlink message type: %u", - (unsigned int) nlmsg->nlmsg_type); + (unsigned int) message->nlmsg_type); break; } - if ((nlmsg->nlmsg_flags & NLM_F_MULTI) == 0 || done) { + if ((message->nlmsg_flags & NLM_F_MULTI) == 0 || done) { // There are no more messages. break; } - nlmsg = NLMSG_NEXT(nlmsg, size); + message = NLMSG_NEXT(message, size); } } -void rtnetlink_ifaddr_manager::handle_nlmsgerr(const nlmsghdr *nlmsg) +void rtnetlink_interface_manager::handle_error(const nlmsghdr *message) { - auto &&err = static_cast(NLMSG_DATA(nlmsg)); - if (nlmsg->nlmsg_len >= NLMSG_LENGTH(sizeof (struct nlmsgerr))) { - syslog(LOG_ERR, "Got RTNETLINK error: %s", strerror(-(err->error))); + if (message->nlmsg_len >= NLMSG_LENGTH(sizeof (struct nlmsgerr))) { + auto &&e = static_cast(NLMSG_DATA(message)); + syslog(LOG_ERR, "Got NETLINK error: %s", strerror(-(e->error))); } } -void rtnetlink_ifaddr_manager::handle_ifaddrmsg(const nlmsghdr *nlmsg) +void rtnetlink_interface_manager::handle_done() +{ + std::lock_guard lock(_refresh_mutex); + + _refreshing = false; + _refresh_completion.notify_all(); +} + +void rtnetlink_interface_manager::handle_ifaddrmsg(const nlmsghdr *message) { // Uses 'NLMSG_SPACE' instead of 'NLMSG_LENGTH' since the payload must be // aligned. auto &&rtattr_offset = NLMSG_SPACE(sizeof (struct ifaddrmsg)); - if (nlmsg->nlmsg_len >= rtattr_offset) { + if (message->nlmsg_len >= rtattr_offset) { auto &&ifaddrmsg = static_cast( - NLMSG_DATA(nlmsg)); + NLMSG_DATA(message)); // Only handles non-temporary and at least link-local addresses. if ((ifaddrmsg->ifa_flags & (IFA_F_TEMPORARY | IFA_F_TENTATIVE)) == 0 && ifaddrmsg->ifa_scope <= RT_SCOPE_LINK) { auto &&rtattr = reinterpret_cast( - reinterpret_cast(nlmsg) + rtattr_offset); - std::size_t rtattr_size = nlmsg->nlmsg_len - rtattr_offset; + reinterpret_cast(message) + rtattr_offset); + std::size_t rtattr_size = message->nlmsg_len - rtattr_offset; while (RTA_OK(rtattr, rtattr_size)) { if (rtattr->rta_type == IFA_ADDRESS && rtattr->rta_len >= RTA_LENGTH(0)) { auto &&addr = RTA_DATA(rtattr); - switch (nlmsg->nlmsg_type) { + switch (message->nlmsg_type) { case RTM_NEWADDR: add_interface_address(ifaddrmsg->ifa_index, ifaddrmsg->ifa_family, addr, RTA_PAYLOAD(rtattr)); @@ -213,52 +215,12 @@ void rtnetlink_ifaddr_manager::handle_ifaddrmsg(const nlmsghdr *nlmsg) } } -void rtnetlink_ifaddr_manager::add_interface_address(unsigned int index, - int family, const void *address, std::size_t address_size) -{ - // TODO: Implement this function. - char ifname[IF_NAMESIZE]; - switch (family) { - case AF_INET: - break; - - case AF_INET6: - break; - - default: - if_indextoname(index, ifname); - syslog(LOG_INFO, "Ignored unknown address family %d on %s", - family, ifname); - break; - } -} - -void rtnetlink_ifaddr_manager::remove_interface_address(unsigned int index, - int family, const void *address, std::size_t address_size) -{ - // TODO: Implement this function. - char ifname[IF_NAMESIZE]; - switch (family) { - case AF_INET: - break; - - case AF_INET6: - break; - - default: - if_indextoname(index, ifname); - syslog(LOG_INFO, "Ignored unknown address family %d on %s", - family, ifname); - break; - } -} - -void rtnetlink_ifaddr_manager::refresh() +void rtnetlink_interface_manager::refresh(bool maybe_asynchronous) { - unique_lock lock(refresh_mutex); + std::unique_lock lock(_refresh_mutex); - if (!refresh_in_progress) { - interface_addresses.clear(); + if (not(_refreshing)) { + remove_interfaces(); unsigned char buffer[NLMSG_LENGTH(sizeof (ifaddrmsg))]; nlmsghdr *nl = reinterpret_cast(buffer); @@ -271,51 +233,51 @@ void rtnetlink_ifaddr_manager::refresh() *ifa = ifaddrmsg(); ifa->ifa_family = AF_UNSPEC; - ssize_t send_size = send(rtnetlink, nl, nl->nlmsg_len, 0); + ssize_t send_size = _os->send(_rtnetlink, nl, nl->nlmsg_len, 0); if (send_size < 0) { syslog(LOG_ERR, "Failed to send to RTNETLINK: %s", strerror(errno)); - throw system_error(errno, generic_category()); + throw std::system_error(errno, std::generic_category()); } else if (send_size != ssize_t(nl->nlmsg_len)) { syslog(LOG_CRIT, "RTNETLINK request truncated"); - throw runtime_error("RTNETLINK request truncated"); + throw std::runtime_error("RTNETLINK request truncated"); } - refresh_in_progress = true; + _refreshing = true; + } + + if (not(maybe_asynchronous)) { + while (_worker_running && _refreshing) { + _refresh_completion.wait(lock); + } } } -void rtnetlink_ifaddr_manager::start() +rtnetlink_interface_manager *rtnetlink_interface_manager::start() { - lock_guard lock(worker_mutex); - - if (!worker_thread.joinable()) { - // Implementation note: - // operator= of volatile atomic classes are somehow - // deleted on GCC 4.7. - worker_stopped.store(false); - worker_thread = thread([this]() { - run(); - }); - - refresh(); + std::lock_guard lock(_worker_mutex); + + if (!_worker_thread.joinable()) { + _worker_running = true; + _worker_thread = std::thread(&rtnetlink_interface_manager::run, this); + + refresh(true); } + + return this; } -void rtnetlink_ifaddr_manager::stop() +void rtnetlink_interface_manager::stop() { - lock_guard lock(worker_mutex); + std::lock_guard lock(_worker_mutex); - // Implementation note: - // operator= of volatile atomic classes are somehow deleted - // on GCC 4.7. - worker_stopped.store(true); - if (worker_thread.joinable()) { + _worker_running = false; + if (_worker_thread.joinable()) { // This should make a blocking recv call return. - refresh(); + refresh(true); - worker_thread.join(); + _worker_thread.join(); } } -#endif /* HAVE_LINUX_RTNETLINK_H */ +#endif /* XLLMNRD_RTNETLINK */ diff --git a/libxllmnrd/rtnetlink.h b/libxllmnrd/rtnetlink.h index a231142..1589dfe 100644 --- a/libxllmnrd/rtnetlink.h +++ b/libxllmnrd/rtnetlink.h @@ -19,109 +19,117 @@ #ifndef RTNETLINK_H #define RTNETLINK_H 1 -#include "ifaddr.h" +#include "interface.h" #include "posix.h" #if HAVE_LINUX_RTNETLINK_H +// Defined to non-zero if libxllmnrd has RTNETLINK support. +#define XLLMNRD_RTNETLINK 1 + #include #include #include #include #include -#include -#include -#include #include +#include namespace xllmnrd { + using std::size_t; + /// Interface manager class based on the Linux RTNETLINK socket. - class rtnetlink_ifaddr_manager: public ifaddr_manager + class rtnetlink_interface_manager: public interface_manager { + private: + /// Operating system interface. + std::shared_ptr _os; + private: /// File descriptor for the RTNETLINK socket. - int rtnetlink; + int _rtnetlink {-1}; + + private: + /// Indicates if a refresh is in progress. + bool _refreshing {false}; + + private: + /// Mutex for the refresh task. + mutable std::mutex _refresh_mutex; + + private: + // Condition variable for the refresh task. + mutable std::condition_variable _refresh_completion; + + private: + // Indicates if the worker thread is terminated. + bool _worker_running {false}; + + private: + // Worker thread. + std::thread _worker_thread; + + private: + // Mutex for the worker. + std::mutex _worker_mutex; protected: /// Opens the RTNETLINK socket. static int open_rtnetlink(const std::shared_ptr &os); public: - rtnetlink_ifaddr_manager(); + rtnetlink_interface_manager(); - explicit rtnetlink_ifaddr_manager(const std::shared_ptr &os); - - rtnetlink_ifaddr_manager(const rtnetlink_ifaddr_manager &) = delete; + explicit rtnetlink_interface_manager(const std::shared_ptr &os); public: - virtual ~rtnetlink_ifaddr_manager(); + virtual ~rtnetlink_interface_manager(); public: - void run(); - - void refresh() override; - void start() override; + /** + * Starts a thread that monitors interface changes and returns 'this'. + * + * This function is thread-safe. + */ + rtnetlink_interface_manager *start(); + + /** + * Returns true if the worker thread is running; false otherwise. + */ + bool running() const + { + return _worker_running; + } + + void refresh(bool maybe_asynchronous = false) override; protected: - void add_interface_address(unsigned int index, int family, - const void *address, std::size_t address_size); + /** + * Stops the worker if running. + */ + void stop(); - void remove_interface_address(unsigned int index, int family, - const void *address, std::size_t address_size); + void run(); - protected: - // Finishes the refresh of the interface addresses. - void finish_refresh(); + /// Processes NETLINK messages. + void process_messages(); - // Receives a RTNETLINK message. - void receive_netlink(int fd, volatile std::atomic_bool *stopped); + /// Dispatches NETLINK messages. + void dispatch_messages(const void *messages, size_t size); - // Decodes a NETLINK message. - void decode_nlmsg(const void *message, std::size_t size); + /// Handles a NETLINK error message. + void handle_error(const struct nlmsghdr *message); - // Handles a NETLINK error message. - void handle_nlmsgerr(const nlmsghdr *nlmsg); + /** + * Handles a NETLINK done message. + * + * This function completes the running refresh task. + */ + void handle_done(); // Handles a RTNETLINK message for an interface address change. - void handle_ifaddrmsg(const nlmsghdr *nlmsg); - - private: - - // Addresses assigned to an interface. - struct addresses { - forward_list address_v4; - forward_list address_v6; - - // Returns true if there are no addresses. - bool empty() const noexcept { - return address_v4.empty() && address_v6.empty(); - } - }; - - // Map from an interface to its addresses. - std::map interface_addresses; - - // Mutex for refresh_in_progress. - std::mutex refresh_mutex; - - // Condition variable for refresh_in_progress. - std::condition_variable refresh_finished; - - // Indicates if a refresh is in progress. - volatile bool refresh_in_progress = false; - - // Mutex for worker. - std::mutex worker_mutex; - - // Worker thread. - std::thread worker_thread; - - // Indicates if the worker thread is terminated. - volatile std::atomic_bool worker_stopped; - - // Stops the worker thread if started. - void stop(); + void handle_ifaddrmsg(const nlmsghdr *message); }; } diff --git a/lsb/Makefile.am b/lsb/Makefile.am index 92b4a24..e517b6c 100644 --- a/lsb/Makefile.am +++ b/lsb/Makefile.am @@ -6,12 +6,6 @@ EXTRA_DIST = xllmnrd.in CLEANFILES = xllmnrd -xllmnrd: $(srcdir)/xllmnrd.in Makefile - @rm -f $@-t $@ - sed -e 's,[@]PACKAGE_NAME[@],$(PACKAGE_NAME),g' \ - -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \ - -e 's,[@]PACKAGE_STRING[@],$(PACKAGE_STRING),g' \ - -e 's,[@]sbindir[@],$(sbindir),g' \ - < $(srcdir)/xllmnrd.in > $@-t - chmod +x $@-t - mv -f $@-t $@ +xllmnrd: $(srcdir)/xllmnrd.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status --file=$(subdir)/$@ + chmod +x $@ diff --git a/lsb/xllmnrd.in b/lsb/xllmnrd.in index 5cb54ca..ddee792 100644 --- a/lsb/xllmnrd.in +++ b/lsb/xllmnrd.in @@ -20,8 +20,11 @@ # NetBIOS name resolution provided by Samba. ### END INIT INFO +prefix=@prefix@ +exec_prefix=@exec_prefix@ +sbindir=@sbindir@ NAME=xllmnrd -DAEMON=@sbindir@/$NAME +DAEMON=${sbindir}/$NAME PIDDIR=/var/run/$NAME USER=xllmnrd diff --git a/po/POTFILES.in b/po/POTFILES.in index 9e5ba2c..0d54225 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,2 +1,2 @@ # List of source files which contain translatable strings. -src/main.cpp +xllmnrd/main.cpp diff --git a/po/ja.po b/po/ja.po index 0fb2b74..18ed944 100644 --- a/po/ja.po +++ b/po/ja.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: xllmnrd 2.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-12-23 09:29+0000\n" +"POT-Creation-Date: 2020-06-13 01:07+0900\n" "PO-Revision-Date: 2014-01-09 08:48+0000\n" "Last-Translator: Kaz Nishimura\n" "Language-Team: Japanese (http://www.transifex.com/projects/p/xllmnrd/" @@ -19,66 +19,66 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: src/main.cpp:311 +#: xllmnrd/main.cpp:317 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "詳しくは ‘%s --help’ をお試しください。\n" -#: src/main.cpp:318 +#: xllmnrd/main.cpp:324 #, c-format msgid "Usage: %s [OPTION]...\n" msgstr "使用法: %s [OPTION]...\n" -#: src/main.cpp:319 +#: xllmnrd/main.cpp:325 #, c-format msgid "Respond to IPv6 LLMNR queries.\n" msgstr "IPv6 LLMNR クエリに応答します。\n" -#: src/main.cpp:321 +#: xllmnrd/main.cpp:327 #, c-format msgid " -f, --foreground run in foreground\n" msgstr " -f, --foreground フォアグラウンドで実行\n" -#: src/main.cpp:323 +#: xllmnrd/main.cpp:329 #, c-format msgid " -p, --pid-file=FILE record the process ID in FILE\n" msgstr " -p, --pid-file=FILE プロセス ID を FILE に記録\n" -#: src/main.cpp:325 +#: xllmnrd/main.cpp:331 #, c-format msgid " -n, --name=NAME set the host name of the responder to NAME\n" msgstr " -n, --name=NAME レスポンダーのホスト名を NAME に設定\n" -#: src/main.cpp:327 +#: xllmnrd/main.cpp:333 #, c-format msgid " --help display this help and exit\n" msgstr " --help このヘルプを表示して終了\n" -#: src/main.cpp:329 +#: xllmnrd/main.cpp:335 #, c-format msgid " --version output version information and exit\n" msgstr " --version バージョン情報を出力して終了\n" -#: src/main.cpp:332 +#: xllmnrd/main.cpp:338 #, c-format msgid "Report bugs to <%s>.\n" msgstr "バグ レポートは <%s> まで。\n" -#: src/main.cpp:336 +#: xllmnrd/main.cpp:342 #, c-format msgid "%s %s\n" msgstr "%s %s\n" -#: src/main.cpp:338 +#: xllmnrd/main.cpp:344 #, c-format msgid "Packaged from revision %s\n" msgstr "リビジョン %s からのパッケージ化\n" -#: src/main.cpp:340 +#: xllmnrd/main.cpp:346 msgid "(C)" msgstr "©" -#: src/main.cpp:341 +#: xllmnrd/main.cpp:347 #, c-format msgid "" "This is free software: you are free to change and redistribute it.\n" diff --git a/po/xllmnrd.pot b/po/xllmnrd.pot index 8935290..fa6faeb 100644 --- a/po/xllmnrd.pot +++ b/po/xllmnrd.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: xllmnrd 3-alpha.2\n" +"Project-Id-Version: xllmnrd 3.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-04-07 13:20+0900\n" +"POT-Creation-Date: 2020-06-13 01:07+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,66 +17,66 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: src/main.cpp:311 +#: xllmnrd/main.cpp:317 #, c-format msgid "Try '%s --help' for more information.\n" msgstr "" -#: src/main.cpp:318 +#: xllmnrd/main.cpp:324 #, c-format msgid "Usage: %s [OPTION]...\n" msgstr "" -#: src/main.cpp:319 +#: xllmnrd/main.cpp:325 #, c-format msgid "Respond to IPv6 LLMNR queries.\n" msgstr "" -#: src/main.cpp:321 +#: xllmnrd/main.cpp:327 #, c-format msgid " -f, --foreground run in foreground\n" msgstr "" -#: src/main.cpp:323 +#: xllmnrd/main.cpp:329 #, c-format msgid " -p, --pid-file=FILE record the process ID in FILE\n" msgstr "" -#: src/main.cpp:325 +#: xllmnrd/main.cpp:331 #, c-format msgid " -n, --name=NAME set the host name of the responder to NAME\n" msgstr "" -#: src/main.cpp:327 +#: xllmnrd/main.cpp:333 #, c-format msgid " --help display this help and exit\n" msgstr "" -#: src/main.cpp:329 +#: xllmnrd/main.cpp:335 #, c-format msgid " --version output version information and exit\n" msgstr "" -#: src/main.cpp:332 +#: xllmnrd/main.cpp:338 #, c-format msgid "Report bugs to <%s>.\n" msgstr "" -#: src/main.cpp:336 +#: xllmnrd/main.cpp:342 #, c-format msgid "%s %s\n" msgstr "" -#: src/main.cpp:338 +#: xllmnrd/main.cpp:344 #, c-format msgid "Packaged from revision %s\n" msgstr "" -#: src/main.cpp:340 +#: xllmnrd/main.cpp:346 msgid "(C)" msgstr "" -#: src/main.cpp:341 +#: xllmnrd/main.cpp:347 #, c-format msgid "" "This is free software: you are free to change and redistribute it.\n" diff --git a/test/Makefile.am b/test/Makefile.am index 989ec36..a184ad1 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -8,16 +8,20 @@ TESTS = CLEANFILES = if CPPUNIT -check_PROGRAMS = test_ifaddr.exec +check_PROGRAMS = test_rtnetlink.exec test_ifaddr.exec check_SCRIPTS = run-test -EXEC_TEST_LOG_COMPILER = $(SHELL) ./run-test +EXEC_LOG_COMPILER = $(SHELL) ./run-test TESTS += $(check_PROGRAMS) CLEANFILES += $(check_SCRIPTS) endif noinst_HEADERS = xmlreport.h +test_rtnetlink_exec_LDADD = $(top_builddir)/libxllmnrd/libxllmnrd.a \ +$(CPPUNIT_LIBS) +test_rtnetlink_exec_SOURCES = main.cpp xmlreport.cpp test_rtnetlink.cpp + test_ifaddr_exec_SOURCES = main.cpp xmlreport.cpp test_ifaddr.cpp test_ifaddr_exec_LDADD = $(top_builddir)/libxllmnrd/libxllmnrd.a \ $(CPPUNIT_LIBS) diff --git a/test/test_ifaddr.cpp b/test/test_ifaddr.cpp index b19c13d..6604e3e 100644 --- a/test/test_ifaddr.cpp +++ b/test/test_ifaddr.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -67,7 +68,7 @@ class IfaddrPreTests : public TestFixture { } void testFailures() { - ifaddr_change_handler handler = &handle_change; + interface_change_handler handler = &handle_change; // Without initialization, an error MUST be detected. CPPUNIT_ASSERT_EQUAL(ENXIO, ifaddr_set_change_handler(&handle_change, &handler)); @@ -78,7 +79,7 @@ class IfaddrPreTests : public TestFixture { CPPUNIT_ASSERT_ASSERTION_FAIL( // This MUST fail. CPPUNIT_ASSERT_EQUAL(0, ifaddr_refresh())); - + size_t size; CPPUNIT_ASSERT_ASSERTION_FAIL( // This MUST fail. @@ -89,7 +90,7 @@ class IfaddrPreTests : public TestFixture { static void handle_signal(int sig) { } - static void handle_change(const struct ifaddr_change *change) { + static void handle_change(const struct interface_change_event *change) { } }; CPPUNIT_TEST_SUITE_REGISTRATION(IfaddrPreTests); @@ -123,7 +124,7 @@ class IfaddrTests : public TestFixture { } void testSetHandler() { - ifaddr_change_handler handler = &handle_change; + interface_change_handler handler = &handle_change; // The initial handler function MUST be null. CPPUNIT_ASSERT_EQUAL(0, ifaddr_set_change_handler(&handle_change, &handler)); @@ -151,6 +152,7 @@ class IfaddrTests : public TestFixture { CPPUNIT_ASSERT_EQUAL(0, ifaddr_refresh())); ifaddr_start(); + sleep(1); // To make sure the interface table is populated. CPPUNIT_ASSERT_EQUAL(0, ifaddr_refresh()); } @@ -170,6 +172,7 @@ class IfaddrTests : public TestFixture { ifaddr_lookup_v6(eth0, 0, NULL, &size))); ifaddr_start(); + sleep(1); // To make sure the interface table is populated. // The loopback interface SHALL be ignored. CPPUNIT_ASSERT_EQUAL(ENODEV, ifaddr_lookup_v6(lo, 0, NULL, &size)); @@ -186,7 +189,7 @@ class IfaddrTests : public TestFixture { static void handle_signal(int sig) { } - static void handle_change(const struct ifaddr_change *change) { + static void handle_change(const struct interface_change_event *change) { } }; CPPUNIT_TEST_SUITE_REGISTRATION(IfaddrTests); diff --git a/test/test_rtnetlink.cpp b/test/test_rtnetlink.cpp new file mode 100644 index 0000000..2ffa387 --- /dev/null +++ b/test/test_rtnetlink.cpp @@ -0,0 +1,142 @@ +/* + * test_rtnetlink.cpp + * Copyright (C) 2020 Kaz Nishimura + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation, either version 3 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#if HAVE_CONFIG_H +#include +#endif + +#include "rtnetlink.h" + +#if XLLMNRD_RTNETLINK + +#include +#include +#include +#include + +using CppUnit::TestFixture; +using xllmnrd::rtnetlink_interface_manager; +using xllmnrd::interface_change_event; +using namespace std; + +/* + * Tests for rtnetlink_interface_manager. + */ +class RtnetlinkTests: public TestFixture +{ + CPPUNIT_TEST_SUITE(RtnetlinkTests); + CPPUNIT_TEST(testSetInterfaceChange); + CPPUNIT_TEST(testStart); + CPPUNIT_TEST_SUITE_END(); + +private: + static unsigned int addInCount; + static unsigned int addIn6Count; + static unsigned int removeInCount; + static unsigned int removeIn6Count; + +private: + unique_ptr manager; + +private: + static void handle_interface_change( + const interface_change_event *const event) + { + switch (event->type) + { + case interface_change_event::ADDED: + switch (event->address_family) + { + case AF_INET: + addInCount++; + clog << "Add an IPv4 address " << addInCount << endl; + break; + + case AF_INET6: + addIn6Count++; + clog << "Add an IPv6 address " << addIn6Count << endl; + break; + + default: + break; + } + break; + + case interface_change_event::REMOVED: + switch (event->address_family) + { + case AF_INET: + removeInCount++; + clog << "Remove an IPv4 address " << removeInCount << endl; + break; + + case AF_INET6: + removeIn6Count++; + clog << "Remove an IPv6 address " << removeIn6Count << endl; + break; + + default: + break; + } + break; + } + } + +public: + void setUp() override + { + manager.reset(new rtnetlink_interface_manager()); + addInCount = 0; + removeInCount = 0; + addIn6Count = 0; + removeIn6Count = 0; + } + + void testSetInterfaceChange() + { + // No handler SHALL be set by default. + auto old = manager->set_interface_change(handle_interface_change); + CPPUNIT_ASSERT_EQUAL(xllmnrd::interface_change_handler(), old); + + // The handler that was set SHALL be returned. + old = manager->set_interface_change(nullptr); + CPPUNIT_ASSERT_EQUAL(&handle_interface_change, old); + } + + void testStart() + { + manager->set_interface_change(handle_interface_change); + CPPUNIT_ASSERT_EQUAL(0U, addInCount); + CPPUNIT_ASSERT_EQUAL(0U, addIn6Count); + CPPUNIT_ASSERT_EQUAL(0U, removeInCount); + CPPUNIT_ASSERT_EQUAL(0U, removeIn6Count); + + manager->start(); + sleep(1); + CPPUNIT_ASSERT(addInCount > removeInCount); + CPPUNIT_ASSERT(addIn6Count > removeIn6Count); + } +}; +CPPUNIT_TEST_SUITE_REGISTRATION(RtnetlinkTests); + +unsigned int RtnetlinkTests::addInCount; +unsigned int RtnetlinkTests::addIn6Count; +unsigned int RtnetlinkTests::removeInCount; +unsigned int RtnetlinkTests::removeIn6Count; + +#endif /* XLLMNRD_RTNETLINK */ diff --git a/src/Makefile.am b/xllmnrd/Makefile.am similarity index 100% rename from src/Makefile.am rename to xllmnrd/Makefile.am diff --git a/src/llmnr.c b/xllmnrd/llmnr.c similarity index 100% rename from src/llmnr.c rename to xllmnrd/llmnr.c diff --git a/src/llmnr.h b/xllmnrd/llmnr.h similarity index 100% rename from src/llmnr.h rename to xllmnrd/llmnr.h diff --git a/src/llmnr_packet.h b/xllmnrd/llmnr_packet.h similarity index 100% rename from src/llmnr_packet.h rename to xllmnrd/llmnr_packet.h diff --git a/src/main.cpp b/xllmnrd/main.cpp similarity index 100% rename from src/main.cpp rename to xllmnrd/main.cpp diff --git a/src/responder.cpp b/xllmnrd/responder.cpp similarity index 96% rename from src/responder.cpp rename to xllmnrd/responder.cpp index aaf748a..8b1d103 100644 --- a/src/responder.cpp +++ b/xllmnrd/responder.cpp @@ -176,7 +176,7 @@ static volatile sig_atomic_t responder_terminated; * @param __change [in] change notification. */ static void responder_handle_ifaddr_change( - const struct ifaddr_change *__change); + const struct interface_change_event *__change); static ssize_t responder_receive_udp(int, void *, size_t, struct sockaddr_in6 *, struct in6_pktinfo *); @@ -327,19 +327,24 @@ void responder_terminate(void) { } void responder_handle_ifaddr_change( - const struct ifaddr_change *restrict change) { + const struct interface_change_event *restrict change) +{ + if (change->address_family != AF_INET6) { + return; + } + if (responder_initialized()) { - if (change->ifindex != 0) { + if (change->interface_index != 0) { const struct ipv6_mreq mr = { - in6addr_mc_llmnr, // .ipv6mr_multiaddr - change->ifindex, // .ipv6mr_interface + in6addr_mc_llmnr, // .ipv6mr_multiaddr + change->interface_index, // .ipv6mr_interface }; char ifname[IF_NAMESIZE]; - if_indextoname(change->ifindex, ifname); + if_indextoname(change->interface_index, ifname); switch (change->type) { - case ifaddr_change::ADDED: + case interface_change_event::ADDED: if (setsockopt(udp_fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mr, sizeof (struct ipv6_mreq)) == 0) { syslog(LOG_NOTICE, @@ -351,7 +356,7 @@ void responder_handle_ifaddr_change( } break; - case ifaddr_change::REMOVED: + case interface_change_event::REMOVED: if (setsockopt(udp_fd, IPPROTO_IPV6, IPV6_LEAVE_GROUP, &mr, sizeof (struct ipv6_mreq)) == 0) { syslog(LOG_NOTICE, diff --git a/src/responder.h b/xllmnrd/responder.h similarity index 100% rename from src/responder.h rename to xllmnrd/responder.h diff --git a/src/xllmnrd.8.in b/xllmnrd/xllmnrd.8.in similarity index 100% rename from src/xllmnrd.8.in rename to xllmnrd/xllmnrd.8.in