[Scamper-dev] scamper API beta

Matthew Luckie mjl at luckie.org.nz
Fri Aug 22 21:16:26 PDT 2003


I was going to chuck it on rum, but that seems to be dead from what i can
tell.

http://voodoo.cs.waikato.ac.nz/~mjl12/scamper_api.h
http://voodoo.cs.waikato.ac.nz/~mjl12/scamper_api.c

I've not created a library before as in -lscamper so I'll look at that
next week while on holiday, i presume i use ar somewhere in there.

Things that suck about the API

 - all the detail is in the 2 files, rather than scamper_trace.[ch],
   scamper_file.[ch] and scamper_hop.[ch] but that will change soon

 - it is not finished, as in the binary file format i did for scamper
   is not in there yet, but that will change soon.  The ascii file format
   is handled though

 - it is not commented, but that will change soon as well

I've been using the API for 2 weeks now, pretty much as is, so it works.

I've put code I've written using the API at
http://voodoo.cs.waikato.ac.nz/~mjl12/scamper_api_examples.tar.gz

Just a few words about the way I did the API.  It is C, with some OO done
with function pointers in the structs.  It works well if you can handle
doing things like trace->hop_addr(trace, 5);  I don't expect that to be
a big issue - doing a C++ wrapper should be pretty trivial if someone felt
the need.  I'd be happy to maintain it but I'm not going to do it.

Things like MTU will go into scamper_extension_t structs when that code is
written, so the hooks are kinda there.  And the accompanying feature
functions that David suggested in his email will come along at that time.

The lib will eventually have the file writing functions in there as well,
like Brad suggested in his email, that is on my TODO list.  The API will
become part of scamper itself rather than a distinct entity as it
currently stands.

I'm going to be on holiday next week, but invariably I'm going to be
mucking around with work stuff when I get the urge, so if something
screams out to you as being missing, or poorly done and needing
attention, let me know.

Sorry this has taken the time it has

Matthew


More information about the Scamper-dev mailing list