Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Use MessagePack for the Unix socket API #75

Merged
merged 183 commits into from
Jan 21, 2018
Merged

Use MessagePack for the Unix socket API #75

merged 183 commits into from
Jan 21, 2018

Commits on Jun 12, 2017

  1. Configuration menu
    Copy the full SHA
    941dfb2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    38c706d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3b99d82 View commit details
    Browse the repository at this point in the history
  4. Interpret HEAD request

    DL6ER committed Jun 12, 2017
    Configuration menu
    Copy the full SHA
    03fc5be View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e159b56 View commit details
    Browse the repository at this point in the history
  6. Replace sprintf() + swrite() by the new ssend() routine. This enhance…

    …ment removes the fixed buffer we used before and allows for responses having arbitraty lengths
    DL6ER committed Jun 12, 2017
    Configuration menu
    Copy the full SHA
    19c54b0 View commit details
    Browse the repository at this point in the history
  7. Add HTTP server tests

    DL6ER committed Jun 12, 2017
    Configuration menu
    Copy the full SHA
    35a1882 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a4fc933 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d7d57a8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    f84b461 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    0ef2256 View commit details
    Browse the repository at this point in the history
  12. Add type variable to all request subroutines which can later be used …

    …to decide whether the output whould be in telnet format, or JSON (possibly even "v2" JSON)
    DL6ER committed Jun 12, 2017
    Configuration menu
    Copy the full SHA
    b2688bf View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2017

  1. Implement API JSON output for summary

    Currently using the cJSON library, as it's entirely contained
    within one source and one header file and is very easy to use.
    By adding on the API output formats to the previous raw socket
    code, we can simply change the output format when the response
    type is `API` instead of `SOCKET`. As shown in the implemented
    summary API code, this should be very simple for most commands.
    AzureMarker committed Jun 13, 2017
    Configuration menu
    Copy the full SHA
    1d29630 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7617293 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5f59aff View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e20fe2a View commit details
    Browse the repository at this point in the history
  5. Clean socket routines, move detection of what the client is asking fo…

    …r into process_api_request() (request.c) much like we already do it for socket requests
    DL6ER committed Jun 13, 2017
    Configuration menu
    Copy the full SHA
    b15f537 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1481176 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    824b9e9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4643f97 View commit details
    Browse the repository at this point in the history
  9. Remove cJSON files. Note that it can be re-added cleanly into the cod…

    …e by reverting this commit.
    DL6ER committed Jun 13, 2017
    Configuration menu
    Copy the full SHA
    2b439cf View commit details
    Browse the repository at this point in the history
  10. Added /stats/top_clients

    DL6ER committed Jun 13, 2017
    Configuration menu
    Copy the full SHA
    776bf43 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2017

  1. Add /stats/forward_dest

    AzureMarker committed Jun 14, 2017
    Configuration menu
    Copy the full SHA
    7af31af View commit details
    Browse the repository at this point in the history
  2. Add /stats/query_types

    AzureMarker committed Jun 14, 2017
    1 Configuration menu
    Copy the full SHA
    0e7f484 View commit details
    Browse the repository at this point in the history
  3. Add alias path for forward destinations

    Also make query types output more like the other responses.
    AzureMarker committed Jun 14, 2017
    Configuration menu
    Copy the full SHA
    249b9e9 View commit details
    Browse the repository at this point in the history
  4. 1 Configuration menu
    Copy the full SHA
    ea0a7cc View commit details
    Browse the repository at this point in the history
  5. Two improvements: 1. Analyze only first line of HTTP request (before …

    …the whole header was analyzed), 2. Anaylze passed GET arguments properly, e.g. allow ?limit=123, but ignore ?sfqw=123
    DL6ER committed Jun 14, 2017
    Configuration menu
    Copy the full SHA
    9cff885 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f2f9601 View commit details
    Browse the repository at this point in the history
  7. Add "/history"

    DL6ER committed Jun 14, 2017
    Configuration menu
    Copy the full SHA
    48d355b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b5c500f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    2179f5d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    b868c56 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    2aa2ff1 View commit details
    Browse the repository at this point in the history
  12. Added "/overTime/query_types"

    DL6ER committed Jun 14, 2017
    Configuration menu
    Copy the full SHA
    9d891d5 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    70e3b5d View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    38ea0a7 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    942250e View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    30a3f7e View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    59fe873 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    5df3233 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2017

  1. Do some formatting

    AzureMarker committed Jun 15, 2017
    Configuration menu
    Copy the full SHA
    ecc2ef3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    446a1b9 View commit details
    Browse the repository at this point in the history
  3. It is no severe issue if the lists (e.g. blacklist) are not there - s…

    …o we should just return an empty array.
    DL6ER committed Jun 15, 2017
    Configuration menu
    Copy the full SHA
    cce43dc View commit details
    Browse the repository at this point in the history
  4. Return data with key "blacklist" or "whitelist" instead of "data". Us…

    …e predefined constants for the location of the white- and blacklist so they can easily be changed in one place, if needed.
    DL6ER committed Jun 15, 2017
    Configuration menu
    Copy the full SHA
    1905f9c View commit details
    Browse the repository at this point in the history
  5. Use getline() instead of the deprecated fgets() to avoid havng to use…

    …d a fixed size buffer
    DL6ER committed Jun 15, 2017
    Configuration menu
    Copy the full SHA
    0e3f8b5 View commit details
    Browse the repository at this point in the history
  6. Imporve triming of newline character when reading in the lists.

    The function strcspn() counts the number of characters until it hits a '\r' or a '\n' (in other words, it finds the first '\r' or '\n').
    If it doesn't hit anything, it stops at the '\0' (returning the length of the string).
    Note that this works fine even if there is no newline, because strcspn stops at a '\0'.
    In that case, the entire line is simply replacing '\0' with '\0'.
    DL6ER committed Jun 15, 2017
    Configuration menu
    Copy the full SHA
    7cef472 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    364ad81 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c8f349d View commit details
    Browse the repository at this point in the history
  9. Add "/dns/status"

    DL6ER committed Jun 15, 2017
    Configuration menu
    Copy the full SHA
    cb9d1cd View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2017

  1. Configuration menu
    Copy the full SHA
    a06ecba View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    693e69b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6cab551 View commit details
    Browse the repository at this point in the history
  4. Add first API test

    DL6ER committed Jun 16, 2017
    Configuration menu
    Copy the full SHA
    c29ce3b View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2017

  1. Make silent

    DL6ER committed Jun 17, 2017
    Configuration menu
    Copy the full SHA
    3f330dd View commit details
    Browse the repository at this point in the history
  2. Minor correction to API tests

    DL6ER committed Jun 17, 2017
    Configuration menu
    Copy the full SHA
    f8072a0 View commit details
    Browse the repository at this point in the history
  3. Adjusted tests

    DL6ER committed Jun 17, 2017
    Configuration menu
    Copy the full SHA
    ec47c81 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2017

  1. Configuration menu
    Copy the full SHA
    17a7823 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9893ef6 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2017

  1. Change key name of forwards over time JSON

    Previously, both `forward_dest` and `forward_destinations` were keys in the JSON output at the root level. Which contains the over time data, and which contains the forward destination hostnames + IP addresses? Because of this ambiguity, the over time section should be renamed to `over_time`.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jun 26, 2017
    Configuration menu
    Copy the full SHA
    5df0395 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'development' into new/API

    Conflicts:
    	request.c
    DL6ER committed Jun 26, 2017
    Configuration menu
    Copy the full SHA
    0dfb855 View commit details
    Browse the repository at this point in the history
  3. Fix tests

    DL6ER committed Jun 26, 2017
    Configuration menu
    Copy the full SHA
    f566fd3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bbb3df2 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2017

  1. Only give relevant total in top domain JSON output

    If it's `top_ads`, give `ads_blocked_today`. If it's `top_domains`, give `dns_queries_tdoay`. Both are not needed at the same time.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jun 27, 2017
    Configuration menu
    Copy the full SHA
    cfea5cf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    542e26c View commit details
    Browse the repository at this point in the history
  3. Fix top domains and ads tests

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jun 27, 2017
    Configuration menu
    Copy the full SHA
    5693b72 View commit details
    Browse the repository at this point in the history
  4. The newline?

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jun 27, 2017
    Configuration menu
    Copy the full SHA
    e0f462e View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2017

  1. Rename /stats/overTime/graphs to graph

    It's returning one graph, not multiple.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jun 30, 2017
    Configuration menu
    Copy the full SHA
    08391f4 View commit details
    Browse the repository at this point in the history
  2. Rename /history to /stats/history

    It provides stats more than DNS functionality. However, it is in more of a gray area than, say, queries over time.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jun 30, 2017
    Configuration menu
    Copy the full SHA
    52d3364 View commit details
    Browse the repository at this point in the history
  3. Rename /dns/recent_blocked to /stats/recent_blocked

    As this is also shown on chronometer, it seems to be related to stats more than anything else.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jun 30, 2017
    Configuration menu
    Copy the full SHA
    7c88707 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2017

  1. Add "GET /stats/dashboard"

    DL6ER committed Jul 4, 2017
    Configuration menu
    Copy the full SHA
    ccbf0ee View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    32c2a41 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2017

  1. Configuration menu
    Copy the full SHA
    c9de13b View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2017

  1. Sanitize domains when outputting /stats/history

    This will have to be extended to the other domain-emitting API calls in future commits.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jul 29, 2017
    Configuration menu
    Copy the full SHA
    0a6f5a5 View commit details
    Browse the repository at this point in the history
  2. Revert "Sanitize domains when outputting /stats/history"

    This reverts commit 0a6f5a5
    The sanitizing will instead be implemented off of dev in the log parsing section.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jul 29, 2017
    Configuration menu
    Copy the full SHA
    345ac16 View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2017

  1. Reorganize to split up API functions

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Aug 6, 2017
    Configuration menu
    Copy the full SHA
    4762b8a View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2017

  1. Configuration menu
    Copy the full SHA
    f64251e View commit details
    Browse the repository at this point in the history
  2. We don't show "pi.hole" anymore in the results. Adjust tests (also fo…

    …r the API component) accordingly.
    
    Signed-off-by: DL6ER <dl6er@dl6er.de>
    DL6ER committed Aug 7, 2017
    Configuration menu
    Copy the full SHA
    551351b View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2017

  1. Add dummy POST handling for whitelist and blacklist

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Aug 9, 2017
    Configuration menu
    Copy the full SHA
    ebe0631 View commit details
    Browse the repository at this point in the history
  2. Fix JSON "not_found" message

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Aug 9, 2017
    Configuration menu
    Copy the full SHA
    9b98101 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2017

  1. Implement simple JSON parsing for addList

    Uses cJSON to parse, but output will still be handled directly.
    I implemented different API response methods to allow for different HTTP
    response codes to be sent.
    The addList code is still dumb and doesn't do anything, but it's getting
    there.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Aug 10, 2017
    Configuration menu
    Copy the full SHA
    9ec7bd8 View commit details
    Browse the repository at this point in the history
  2. Check if domain is invalid

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Aug 10, 2017
    Configuration menu
    Copy the full SHA
    2f8e540 View commit details
    Browse the repository at this point in the history
  3. Actually add the domain to the list

    This requires the `pihole` user to have sudo access to the `pihole`
    command (will require a core update). Many future API commands will have
    this requirement, as they too will be using the `pihole` command.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Aug 10, 2017
    Configuration menu
    Copy the full SHA
    3a5752d View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2017

  1. Configuration menu
    Copy the full SHA
    a743931 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    87dc82c View commit details
    Browse the repository at this point in the history
  3. Add whitelist and blacklist deletion API endpoints

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Aug 11, 2017
    Configuration menu
    Copy the full SHA
    1893aa5 View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2017

  1. Configuration menu
    Copy the full SHA
    06be1c4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    729d5d4 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2017

  1. Perform better request endpoint checking

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Aug 17, 2017
    Configuration menu
    Copy the full SHA
    fb574f7 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2017

  1. Fix broken domain verification if the domain includes numbers

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Sep 4, 2017
    Configuration menu
    Copy the full SHA
    4842c16 View commit details
    Browse the repository at this point in the history
  2. Add Wildlist support

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Sep 4, 2017
    Configuration menu
    Copy the full SHA
    834a959 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2017

  1. Configuration menu
    Copy the full SHA
    e5c4d19 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2017

  1. Fix tests

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Sep 27, 2017
    Configuration menu
    Copy the full SHA
    e2f2f0d View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2017

  1. Move getPayload to api.c

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Nov 27, 2017
    Configuration menu
    Copy the full SHA
    3331c42 View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2017

  1. Merge remote-tracking branch 'origin/development' into new/API

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    
    # Conflicts:
    #	request.c
    #	test/test_suite.sh
    AzureMarker committed Dec 23, 2017
    Configuration menu
    Copy the full SHA
    604ad7e View commit details
    Browse the repository at this point in the history
  2. Fix getVersion after merge

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Dec 23, 2017
    Configuration menu
    Copy the full SHA
    3573f54 View commit details
    Browse the repository at this point in the history
  3. Fix newly merged in API functions

    They were using the missing `swrite` function.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Dec 23, 2017
    Configuration menu
    Copy the full SHA
    894bd39 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1f5ca04 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4e90a6e View commit details
    Browse the repository at this point in the history
  6. Fix domains_being_blocked output

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Dec 23, 2017
    Configuration menu
    Copy the full SHA
    2212e23 View commit details
    Browse the repository at this point in the history

Commits on Dec 24, 2017

  1. Implement simple password-protection to the HTTP API

    Currently has the hardcoded password of "password". You gain a session
    by sending JSON to the API with the key of `password` and the value
    set to the password you are trying to use. Then it will return a success
    response with the session and will add a Set-Cookie header to set the
    FTL_SESSION cookie to the session number.
    
    The summary, queries graph, and status are accessible without
    authentication.
    
    The internal data structure used to store the sessions is valid for up
    to 24 minutes after the last query. If it becomes invalid then it is
    eligible to be reused for a new session. The garbage collection can be
    optimized further, but it is not a problem at the moment.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Dec 24, 2017
    Configuration menu
    Copy the full SHA
    5005f28 View commit details
    Browse the repository at this point in the history
  2. Fix invalid for loop error

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Dec 24, 2017
    Configuration menu
    Copy the full SHA
    ae81270 View commit details
    Browse the repository at this point in the history

Commits on Dec 25, 2017

  1. Make client IPs globally available in FTL (array of strings clientip[…

    …sockedidentifier]) for possible use in authentication
    
    Signed-off-by: DL6ER <dl6er@dl6er.de>
    DL6ER committed Dec 25, 2017
    Configuration menu
    Copy the full SHA
    cd2fd11 View commit details
    Browse the repository at this point in the history
  2. Make sure the API handler ignores clients when over the limit

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Dec 25, 2017
    Configuration menu
    Copy the full SHA
    f15b9ed View commit details
    Browse the repository at this point in the history
  3. Validate domain earlier in removeList

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Dec 25, 2017
    Configuration menu
    Copy the full SHA
    636183b View commit details
    Browse the repository at this point in the history

Commits on Dec 26, 2017

  1. Free client IP data after API handler runs and close rejected sockets

    Also added more debugclients logging.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Dec 26, 2017
    Configuration menu
    Copy the full SHA
    c9e40a4 View commit details
    Browse the repository at this point in the history
  2. Add IP address into the authentication check

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Dec 26, 2017
    Configuration menu
    Copy the full SHA
    6050aa5 View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2018

  1. Merge remote-tracking branch 'origin/development' into new/API

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 3, 2018
    Configuration menu
    Copy the full SHA
    8adb3d3 View commit details
    Browse the repository at this point in the history
  2. Disable HTTP tests as authorization is not gained in the tests yet

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 3, 2018
    Configuration menu
    Copy the full SHA
    f62f9f0 View commit details
    Browse the repository at this point in the history
  3. Fix tests

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 3, 2018
    Configuration menu
    Copy the full SHA
    3d78cc3 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2018

  1. Remove HTTP API specific code so it can be replaced with a new protocol

    Adjusted tests to fit the current lack of output on the unix socket.
    Added TELNET enum and used it in place of the old SOCKET to better fit
    with the rest of the code base.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 4, 2018
    Configuration menu
    Copy the full SHA
    595ab25 View commit details
    Browse the repository at this point in the history
  2. Remove duplicate dnsmasq config file location

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 4, 2018
    Configuration menu
    Copy the full SHA
    620bb44 View commit details
    Browse the repository at this point in the history
  3. Remove extra parameter from bind_to_telnet_port

    Since it has been specialized, it is only called to create the telnet
    port.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 4, 2018
    Configuration menu
    Copy the full SHA
    97f6ac5 View commit details
    Browse the repository at this point in the history
  4. Remove Json libraries

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 4, 2018
    Configuration menu
    Copy the full SHA
    c0048e9 View commit details
    Browse the repository at this point in the history
  5. Implement getStats using MessagePack

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 4, 2018
    Configuration menu
    Copy the full SHA
    e527985 View commit details
    Browse the repository at this point in the history
  6. Don't declare variables in for loops

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 4, 2018
    Configuration menu
    Copy the full SHA
    439227a View commit details
    Browse the repository at this point in the history
  7. Fix socket test

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 4, 2018
    Configuration menu
    Copy the full SHA
    b5c9c6e View commit details
    Browse the repository at this point in the history
  8. Add swrite function

    It will print a warning if an error happens, like the other s* functions
    in socket.c
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 4, 2018
    Configuration menu
    Copy the full SHA
    616b10a View commit details
    Browse the repository at this point in the history
  9. Add istelnet array

    Signed-off-by: DL6ER <dl6er@dl6er.de>
    DL6ER committed Jan 4, 2018
    Configuration menu
    Copy the full SHA
    203cc94 View commit details
    Browse the repository at this point in the history
  10. Use istelnet[] in getStats()

    Signed-off-by: DL6ER <dl6er@dl6er.de>
    DL6ER committed Jan 4, 2018
    Configuration menu
    Copy the full SHA
    f0793be View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2018

  1. Add socket implementation for getOverTime

    Adds the map16 structure to msgpack.c and tightens the pack_int
    signature to only accept int32_t types.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 6, 2018
    Configuration menu
    Copy the full SHA
    e54b391 View commit details
    Browse the repository at this point in the history
  2. Use istelnet for getOverTime

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 6, 2018
    Configuration menu
    Copy the full SHA
    c0022a9 View commit details
    Browse the repository at this point in the history
  3. Use istelnet for getAllQueries

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 6, 2018
    Configuration menu
    Copy the full SHA
    adfcacc View commit details
    Browse the repository at this point in the history
  4. Remove old HTTP argument parsing from getAllQueries

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 6, 2018
    Configuration menu
    Copy the full SHA
    c6369dd View commit details
    Browse the repository at this point in the history
  5. Tighten parameters on pack_unsigned_char

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 6, 2018
    Configuration menu
    Copy the full SHA
    4eaf794 View commit details
    Browse the repository at this point in the history
  6. Use uint8_t instead of unsigned char in msgpack.c

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 6, 2018
    Configuration menu
    Copy the full SHA
    4386138 View commit details
    Browse the repository at this point in the history
  7. Add socket implementation for getAllQueries

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 6, 2018
    Configuration menu
    Copy the full SHA
    348a2ee View commit details
    Browse the repository at this point in the history
  8. Don't send fixarray for getAllQueries

    It's unnecessary
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 6, 2018
    Configuration menu
    Copy the full SHA
    7d3dfb6 View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2018

  1. Remove dead code in getAllQueries

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 7, 2018
    Configuration menu
    Copy the full SHA
    e07786e View commit details
    Browse the repository at this point in the history
  2. Add socket implementation to getTopDomains and use istelnet

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 7, 2018
    Configuration menu
    Copy the full SHA
    05f8604 View commit details
    Browse the repository at this point in the history
  3. Add socket implementation to getTopClients and use istelnet

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 7, 2018
    Configuration menu
    Copy the full SHA
    00f8877 View commit details
    Browse the repository at this point in the history
  4. Add socket implementation to getForwardDestinations and use istelnet

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 7, 2018
    Configuration menu
    Copy the full SHA
    33dd350 View commit details
    Browse the repository at this point in the history
  5. Add socket implementation to getQueryTypes and use istelnet

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 7, 2018
    Configuration menu
    Copy the full SHA
    3f1ffaf View commit details
    Browse the repository at this point in the history
  6. Add socket implementation to getRecentBlocked and use istelnet

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 7, 2018
    Configuration menu
    Copy the full SHA
    555a0cb View commit details
    Browse the repository at this point in the history
  7. Remove extra formatting changes

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 7, 2018
    Configuration menu
    Copy the full SHA
    55e18ea View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2018

  1. Add socket implementation to getMemoryUsage and use istelnet

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 8, 2018
    Configuration menu
    Copy the full SHA
    81200a2 View commit details
    Browse the repository at this point in the history
  2. Fix pack_uint64

    It needed to have its endianness flipped.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 8, 2018
    Configuration menu
    Copy the full SHA
    89ea996 View commit details
    Browse the repository at this point in the history
  3. Add socket implementation to getForwardDestinationsOverTime and istelnet

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 8, 2018
    Configuration menu
    Copy the full SHA
    7d0f680 View commit details
    Browse the repository at this point in the history
  4. Add socket implementation to getClientID and use istelnet

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 8, 2018
    Configuration menu
    Copy the full SHA
    0814339 View commit details
    Browse the repository at this point in the history
  5. Add socket implementation to getQueryTypesOverTime and use istelnet

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 8, 2018
    Configuration menu
    Copy the full SHA
    779a824 View commit details
    Browse the repository at this point in the history
  6. Remove the unused first boolean variables (used by Json serialization)

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 8, 2018
    Configuration menu
    Copy the full SHA
    bd63981 View commit details
    Browse the repository at this point in the history
  7. Add socket implementation of getVersion and use istelnet

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 8, 2018
    Configuration menu
    Copy the full SHA
    2671a6f View commit details
    Browse the repository at this point in the history
  8. Add socket implementation of getDBstats and use istelnet

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 8, 2018
    Configuration menu
    Copy the full SHA
    64a1408 View commit details
    Browse the repository at this point in the history
  9. Use ssend in getClientsOverTime

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 8, 2018
    Configuration menu
    Copy the full SHA
    f90f6c8 View commit details
    Browse the repository at this point in the history
  10. Add socket implementation for getClientsOverTime and use istelnet

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 8, 2018
    Configuration menu
    Copy the full SHA
    dde1602 View commit details
    Browse the repository at this point in the history
  11. Use ssend in getClientNames

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 8, 2018
    Configuration menu
    Copy the full SHA
    1482742 View commit details
    Browse the repository at this point in the history
  12. Add socket implementation to getClientNames and use istelnet

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 8, 2018
    Configuration menu
    Copy the full SHA
    43716b4 View commit details
    Browse the repository at this point in the history
  13. Add socket implementation to getUnknownQueries and use istelnet

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 8, 2018
    Configuration menu
    Copy the full SHA
    da7c354 View commit details
    Browse the repository at this point in the history
  14. Let socket-test take in an optional command

    Example:
    ./socket-test travis ">stats"
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 8, 2018
    Configuration menu
    Copy the full SHA
    30ae391 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2018

  1. Don't show a warning if write() returns 0 (this isn't an error)

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 9, 2018
    Configuration menu
    Copy the full SHA
    4ed20a4 View commit details
    Browse the repository at this point in the history
  2. Send forward destinations names and IP addresses alongside overTime data

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 9, 2018
    Configuration menu
    Copy the full SHA
    37360bb View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2018

  1. Reimplement output for getList

    Adds `>getWhitelist`, `>getBlacklist`, and `getWildlist`
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 11, 2018
    Configuration menu
    Copy the full SHA
    f02c4e8 View commit details
    Browse the repository at this point in the history
  2. Reimplement output for getPiholeStatus

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 11, 2018
    Configuration menu
    Copy the full SHA
    b9780dc View commit details
    Browse the repository at this point in the history
  3. Remove getList

    Most DNS endpoints will be implemented in the API to keep FTL focused
    on providing stats.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 11, 2018
    Configuration menu
    Copy the full SHA
    7d87722 View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2018

  1. Remove getPiholeStatus

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 12, 2018
    Configuration menu
    Copy the full SHA
    3158f17 View commit details
    Browse the repository at this point in the history
  2. Remove addList

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 12, 2018
    Configuration menu
    Copy the full SHA
    cf2aff7 View commit details
    Browse the repository at this point in the history
  3. Remove the rest of the DNS commands and unused helpers

    They now live in the API
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 12, 2018
    Configuration menu
    Copy the full SHA
    071f924 View commit details
    Browse the repository at this point in the history
  4. Rename api_stats.c to api.c

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 12, 2018
    Configuration menu
    Copy the full SHA
    1983d3d View commit details
    Browse the repository at this point in the history
  5. Update the Makefile with new API file structure

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 12, 2018
    Configuration menu
    Copy the full SHA
    700a21b View commit details
    Browse the repository at this point in the history
  6. Move command() up to the top of the file so it isn't as hidden

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 12, 2018
    Configuration menu
    Copy the full SHA
    353e0cb View commit details
    Browse the repository at this point in the history
  7. Merge remote-tracking branch 'origin/development' into new/API

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    
    # Conflicts:
    #	main.c
    #	request.c
    #	routines.h
    #	socket.c
    AzureMarker committed Jan 12, 2018
    Configuration menu
    Copy the full SHA
    0013edb View commit details
    Browse the repository at this point in the history
  8. Fix checkClientLimit

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 12, 2018
    Configuration menu
    Copy the full SHA
    31c422e View commit details
    Browse the repository at this point in the history
  9. Fix incorrect merging

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 12, 2018
    Configuration menu
    Copy the full SHA
    9b8b232 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2018

  1. Add *. to domains in getTopDomains if it's for audit and a wildcard

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 14, 2018
    Configuration menu
    Copy the full SHA
    c88af99 View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'origin/development' into new/API

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    
    # Conflicts:
    #	main.c
    #	request.c
    #	routines.h
    #	socket.c
    AzureMarker committed Jan 14, 2018
    Configuration menu
    Copy the full SHA
    d3d7098 View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2018

  1. Reword api.c license header description

    Removed reference to the HTTP API.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 20, 2018
    Configuration menu
    Copy the full SHA
    cf0cdfe View commit details
    Browse the repository at this point in the history
  2. Reword api.h license description header

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 20, 2018
    Configuration menu
    Copy the full SHA
    7c57b86 View commit details
    Browse the repository at this point in the history
  3. Add back detailed ssend error message

    Might have been lost in a merge.
    
    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 20, 2018
    Configuration menu
    Copy the full SHA
    1fd7ade View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    232507a View commit details
    Browse the repository at this point in the history
  5. Implement some of the review comments

    Signed-off-by: DL6ER <dl6er@dl6er.de>
    DL6ER committed Jan 20, 2018
    Configuration menu
    Copy the full SHA
    0aee819 View commit details
    Browse the repository at this point in the history
  6. Remove clientips[]

    Signed-off-by: DL6ER <dl6er@dl6er.de>
    DL6ER committed Jan 20, 2018
    Configuration menu
    Copy the full SHA
    df3b049 View commit details
    Browse the repository at this point in the history
  7. Remove sleep from main()

    Signed-off-by: DL6ER <dl6er@dl6er.de>
    DL6ER committed Jan 20, 2018
    Configuration menu
    Copy the full SHA
    996689f View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2018

  1. Fix indentation in msgpack.c

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 21, 2018
    Configuration menu
    Copy the full SHA
    9f5ae62 View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'origin/development' into new/API

    # Conflicts:
    #	FTL.h
    #	socket.c
    AzureMarker committed Jan 21, 2018
    Configuration menu
    Copy the full SHA
    590f1f9 View commit details
    Browse the repository at this point in the history
  3. Don't use buffers in getStats

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 21, 2018
    Configuration menu
    Copy the full SHA
    173efff View commit details
    Browse the repository at this point in the history
  4. Clarify getOverTime comment

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 21, 2018
    Configuration menu
    Copy the full SHA
    76aff45 View commit details
    Browse the repository at this point in the history
  5. Fix under-allocation in getTopDomains

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 21, 2018
    Configuration menu
    Copy the full SHA
    ad99f97 View commit details
    Browse the repository at this point in the history
  6. Use float instead of double in getForwardDestinationsOverTime

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 21, 2018
    Configuration menu
    Copy the full SHA
    4e8027b View commit details
    Browse the repository at this point in the history
  7. Use float instead of double in getQueryTypesOverTime

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 21, 2018
    Configuration menu
    Copy the full SHA
    be5815f View commit details
    Browse the repository at this point in the history
  8. Fix under-allocation in getVersion

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 21, 2018
    Configuration menu
    Copy the full SHA
    9007af7 View commit details
    Browse the repository at this point in the history
  9. Fix status output in getStats

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 21, 2018
    Configuration menu
    Copy the full SHA
    42bf9a4 View commit details
    Browse the repository at this point in the history
  10. Only allow up to 2GB strings to be sent

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 21, 2018
    Configuration menu
    Copy the full SHA
    b6b7b57 View commit details
    Browse the repository at this point in the history
  11. Use a static buffer for getallqueries string arguments

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 21, 2018
    Configuration menu
    Copy the full SHA
    9bc0562 View commit details
    Browse the repository at this point in the history
  12. Handle possible pack_fixstr or pack_str32 error

    Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
    AzureMarker committed Jan 21, 2018
    Configuration menu
    Copy the full SHA
    5341b18 View commit details
    Browse the repository at this point in the history