> >I already wrote a C++ program that parses Radius logs and converts them
> >into usage Logs. I'm trying to eliminate errors by detecting 'Login without
> >Logout' and 'Logout without Login'
>
> You can't trust the accounting packets to be logged in sequence. Delay in
> the net, etc. could very well cause the start record of session 2 to
> be logged before the stop record of session 1, not to mention having
> the stop record of session 1 beeing logged before the start record of
> session one (for very short session).
>
> The thing to do is to scan all the logs sequencially, and do something like
> this:
> - - Does is match a record of the other type?
> - Yes: we have a pair. Does the times match apx?
No need to worry about times matching- just compare the portmaster that
generated it and the Session-Id. All records from a given session on a given
portmaster (including duplicates) will have the same, unique to that portmaster,
Session-Id.
> - Yes: save to disk.
> - No: dump.
> - No: save in memory as a pending record.
>
> Sverre