Troliver

stories of war between boy and machine

Project: Switchy McPortface

Introduction:

Gets useful information about your client computers and the switches they are connected to over the network. Like SNMP, but from the point of view of the computers, rather than the switches. I’ll tidy this all up later when I get around to it, but the main task is to record everything and get something show-off-able!

Outstanding

Database

  • Improve web interface
  • Use PDO instead of mysql explicitly for DB
  • Create table or queries for switches, vlans and rooms
  • Properly validate each submission against existing entries
  • Create log file for storing and updating database entries
  • Add date updated field
  • Create installer
  • Add a check, when a record is updated and a new history entry is created, to see whether or not it has been “acknowledged” or not, so that a report can be generated to review changed computers
  • Tidier storing of logs

Client

  • More debug info (store in a log file)
  • Static link libraries
  • Name project
  • Mac release
  • Windows release
  • Linux release
  • Release builds to have no interface at all (automated) unless run from command line
  • Issue: fix adapters with retained IP on a host’s adapter(s)
  • Issue: detect (and exclude) wireless connections
  • Tidy up screen output (\n in the right places) and ensure that debug and release have different behaviour
  • Tidy up LLDP TLVs
  • Tidy up CDP TLVs

Configuration file maker

  • Option to generate a log file
  • By default, make an assumption of the network you are using (have it greyed out) but allow the option to override with a checkbox
  • Include provision for compiling a single binary file, with all configuration included in the build itself
  • Allow advanced mode
    • Use encryption keys
    • Specify username/password for server

Misc

  • Create makefile and .sln files for distribution
  • Put it all on git or sourceforge
  • FOG integration (database and client)

Changelog:

 


June 22nd 2016

Version 0.3

Only minor changes to report. The configuration tool has been tweaked a bit further and the client has been tidied up a little more, in preparation for attempting to make a cross-platform source file.

Added

The client now can be set to output to a log file, rather than to upload data to a server

Fixes

Some redudant functions have been removed.

Outstanding

Client

  • Tidy up screen output (\n in the right places) and ensure that debug and release have different behaviour
  • Tidy up LLDP TLVs
  • Tidy up CDP TLVs

Configuration file maker

  • Option to generate a log file

June 6th 2016

Version 0.2

cURL is no more! I have sped ahead and managed to cut this out entirely by using sockets instead of the cURL library. This means that no extra DLL is needed, although this probably could have been configured to not use a DLL, given enough time, anyway. I may need to come back to this later, however, for using SSL.

The new solution uses sockets from Winsock – but this will need to be changed to be platform-independent if possible later.

Added

The server address in the config file now has the page, and the address, as separate items. This just makes it easier when sending the POST request to the server; cURL seemed to split this out for us (give it the full address, including http://, and it does internal magic to split that up as necessary) but this has to be done manually if you’re just working with sockets directly.

Fixes

Outstanding

Client

  • Find out why CURL can be so slow
  • Replace CURL with native platform socket code
  • Issue: detect (and exclude) wireless connections

May 26th 2016

Version 0.1

My new job has hampered progress but given new opportunities. We use an HP switch environment, rather than Cisco – so this presents a potentially new format of TLVs to try out. I have changed the versioning to 0.1 now, since I have actually started to deploy this and make use of it. There have been a number of changes:

Added

Configuration file maker is now a reality and can read from and write to a configuration file. Database generates log files now, stored in webdirectory, and now has a new table for host history and works as follows:

  • When a host uploads its data, it will check to see if the host exists.
  • If the hosts exists, it will update the time that the host was last checked, to reflect that it the data was actually processed at all.
    • If any of the data has changed since last time, a new record is created with the old data and the time that the data had been valid for (the date range that the data existed as the current record for). This is essentially a changelog so that historical host data can be seen.
    • The host is then updated with the new information

Fixes

Outstanding

Configuration file maker

  • Specify server to store the data on
  • Allow advanced mode
    • Choose protocols to search for
    • Timeout value
  • Include provision for compiling a single binary file, with all configuration included in the build itself

Database

  • Add a check, when a record is updated and a new history entry is created, to see whether or not it has been “acknowledged” or not, so that a report can be generated to review changed computers
  • Tidier storing of logs

Client

  • Replace CURL with native platform socket code

October 23rd 2015

Version 0.0.4

An old (but new) update.

It looks like adapters will retain their IP, even if they are inactive and have been disconnected. This can result in disconnected adapters being selected as the interface to listen on, even if they aren’t connected.

Added

CDP packets are now internally formatted to be read as TLVs, based on Cisco’s CDP standard (which is hard to find anywhere). Won’t bother with any other protocols – if anywhere uses them, though, I can add them in one day.

Added cases for checking

Capture protocol used (CDP or LLDP) when uploading data.

Fixed some output formatting

Fixes

Outstanding

Client

  • Create TLVs for CDP and other protocols
  • Issue: fix adapters with retained IPs

August 24th 2015

Version 0.0.3

New update, finally!

Added

LLDP packets are now internally formatted to be read as TLVs, based on IEEE 802.1AB/2009.

Better formatting of output

Fixes

Outstanding

Client

  • Use TLVs instead of currently “guessing” where data is
  • Create TLVs for CDP and other protocols

 

May 22nd 2015

Version 0.0.2 (Also really really early)

Mostly just adding a configuration file. Still lots that needs doing.

Added

  • Configuration file. You can specify server address, timeout, whether to use LLDP and/or CDP and what the first octet of the network address is to look for (eg 10, 192, etc).

Fixes

  • All adapters are now checked for the correct adapter. Previously, only the first two were ever checked and the program would never exit

Outstanding

Database

  • Create installer

Client

  • Static link libraries
  • Create config file reader

 

December 22nd 2014

Version 0.0.1 (Really really early build)

Currently works by running from command line. No code yet.

Issues

  • Only checks if a packet is CDP or LLDP, with no distinction for filtering packets destined for phones. Causes incorrect submissions of entries to database.

Outstanding

  • Improve web interface
  • Use PDO instead of mysql explicitly for DB
  • Create table or queries for switches, vlans and rooms
  • Properly validate each submission against existing entries
  • Create log file for storing and updating database entries
  • Add date updated field
  • More debug info
  • Find out why CURL is so slow
  • Name project
  • Use TLVs instead of currently “guessing” where data is
  • Create config file reader
  • Create config file writer
    • Specify server to store the data on
    • By default, assume that this is the network you are using (have it greyed out) but allow the option to override with a checkbox
    • Allow advanced mode
      • Choose protocols to search for
      • Timeout value
      • Use encryption keys
      • Specify username/password for server
  • Release build to have no interface at all (automated) unless run from command line
  • Create installer to bundle everything up
  • Create webgl client to visualise all data
  • Create Mac and Linux versions
  • Create makefile and .sln files for distribution
  • Put it all on git or sourceforge
  • FOG module

Leave a Reply

Your email address will not be published. Required fields are marked *