/[darkstattype]/trunk/darkstattype.c
ViewVC logotype

Log of /trunk/darkstattype.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (download) (annotate)
Sticky Revision:

Revision 21 - (view) (download) (annotate) - [select for diffs]
Modified 2014-04-09T10:31:01Z (9 years, 11 months ago) by trond
File length: 25250 byte(s)
Diff to previous 20
stable/9 has switched to clang 3.4. Silly mistake.


Revision 20 - (view) (download) (annotate) - [select for diffs]
Modified 2014-04-09T10:26:49Z (9 years, 11 months ago) by trond
File length: 25250 byte(s)
Diff to previous 19
64-bit quantities, i.e. int64_t, differ on i386 and amd64.

In the first case it's an alias for long long, but in the second
case it's an alias for long.

The solution seems to be twofold: (1) use printf length modifier for
(unsigned) long long, and (2) explicitly cast each 64-bit quantity
to (unsigned) long long.

Tested on FreeBSD/i386  stable/8 r255624 with gcc 4.2.1.
Tested on FreeBSD/amd64 stable/9 r263963 with clang 3.3.
Tested on FreeBSD/amd64 stable/9 r263963 with clang 3.3 using -m32.


Revision 19 - (view) (download) (annotate) - [select for diffs]
Modified 2014-04-09T09:20:17Z (9 years, 11 months ago) by trond
File length: 24643 byte(s)
Diff to previous 16
Reformatted long lines.
Clarified the help message.
Added proper length modifiers to 8-bit and 16-bit quantities (hh and h).


Revision 16 - (view) (download) (annotate) - [select for diffs]
Modified 2014-03-21T19:15:01Z (10 years ago) by trond
File length: 23492 byte(s)
Diff to previous 15
Changed the encoding from ISO 8859-1 to UTF-8.


Revision 15 - (view) (download) (annotate) - [select for diffs]
Modified 2014-03-21T18:57:27Z (10 years ago) by trond
File length: 23420 byte(s)
Diff to previous 14
Made use of the typedefs and macros found in stdint.h to make this program more portable.
Minor nits in the read functions.


Revision 14 - (view) (download) (annotate) - [select for diffs]
Modified 2014-03-21T18:35:50Z (10 years ago) by trond
File length: 24643 byte(s)
Diff to previous 13
Made it possible to treat many files in a row.


Revision 13 - (view) (download) (annotate) - [select for diffs]
Modified 2014-03-21T16:59:56Z (10 years ago) by trond
File length: 24426 byte(s)
Diff to previous 12
I better format unsigned integers as such.


Revision 12 - (view) (download) (annotate) - [select for diffs]
Modified 2014-03-21T16:04:33Z (10 years ago) by trond
File length: 24426 byte(s)
Diff to previous 11
Minor nits.


Revision 11 - (view) (download) (annotate) - [select for diffs]
Modified 2014-03-21T16:03:12Z (10 years ago) by trond
File length: 24442 byte(s)
Diff to previous 10
I figured it's neater to read the IPv6 addresses at 16 bit at a time.


Revision 10 - (view) (download) (annotate) - [select for diffs]
Modified 2014-03-21T15:40:57Z (10 years ago) by trond
File length: 24934 byte(s)
Diff to previous 9
Added file read offset to most of the error messages.


Revision 9 - (view) (download) (annotate) - [select for diffs]
Modified 2014-03-20T09:49:12Z (10 years ago) by trond
File length: 24463 byte(s)
Diff to previous 8
Added a command line option (-f) that toggles darkstattype to adhere to
the strict format specification. The default is set to off (false)
to go with darkstat's (f)actual format.


Revision 8 - (view) (download) (annotate) - [select for diffs]
Modified 2014-03-20T09:00:33Z (10 years ago) by trond
File length: 24355 byte(s)
Diff to previous 7
Added an explanation of the options to the description of usage.


Revision 7 - (view) (download) (annotate) - [select for diffs]
Modified 2014-03-19T15:40:13Z (10 years ago) by trond
File length: 24241 byte(s)
Diff to previous 6
darkstat 3.0.718 has deviated from the format specified in the export-format.txt file.
The lastseen timestamps comes ahead of the MAC address.
Added a macro to choose whether to follow the strict format or the latest format.
Interpretation of the latest format is the default. Perhaps this should be a command line option.
Corrected a serious mistake in my conversion of 64 bit quantities from network byte order (big endian) to little endian.
Why can't ntohl() and its friends have 64 bit counterparts?


Revision 6 - (view) (download) (annotate) - [select for diffs]
Modified 2014-03-19T14:02:41Z (10 years ago) by trond
File length: 22757 byte(s)
Diff to previous 5
Changed literate constants into macros.
Added hexadecimal display of timestamps.
Minor nits.


Revision 5 - (view) (download) (annotate) - [select for diffs]
Modified 2014-03-19T09:13:57Z (10 years ago) by trond
File length: 22454 byte(s)
Diff to previous 4
Display the protocol number with two hexadecimal digits.


Revision 4 - (view) (download) (annotate) - [select for diffs]
Modified 2014-03-19T08:51:24Z (10 years ago) by trond
File length: 22452 byte(s)
Diff to previous 3
Might as well show the Subversion revision number when displaying the version information.


Revision 3 - (view) (download) (annotate) - [select for diffs]
Added 2014-03-19T08:49:18Z (10 years ago) by trond
File length: 22431 byte(s)
Added BSDmakefile and darkstattype.c.


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

svn@ximalas.info
ViewVC Help
Powered by ViewVC 1.3.0-dev