152419Sjulian$FreeBSD$
252419SjulianDevelopment ideas..
352419Sjulian
452419SjulianArchie's suggestions... :-)
552419Sjulian
652419Sjulian - There should be a new malloc type: M_NETGRAPH
752419Sjulian	[DONE]
852419Sjulian	- all mallocs/frees now changed to use this.. JRE
952419Sjulian	- might further split them out some time.
1052419Sjulian
1152419Sjulian - Use MALLOC and FREE macros instead of direct function calls
1252419Sjulian	[DONE]
1352419Sjulian	- They allow conditional compilation which keeps
1452419Sjulian	  statistics & counters on various memory allocation
1552419Sjulian	  (or so it seems)
1670700Sjulian	   - Now tend to have NG_FREE_XX() macros. they
1770700Sjulian	     allow better debugging
1852419Sjulian
1952419Sjulian - In struct ng_mesg: at least make "header" into "hdr", if not
2052419Sjulian   getting rid of it altogether. It doesn't seem necessary and
2152419Sjulian   makes all my C code lines too long.
2252419Sjulian
2352419Sjulian	- I understand.. one thought however.. consider..
2452419Sjulian	  if char data[0] were not legal,  so that data[1] needed to be
2552419Sjulian	  used instead, then the only way to get the size of the header
2652419Sjulian	  would be sizeof(msg.header) as sizeof(msg) would include the dummy
2752419Sjulian	  following bytes. this is a portability issue and I hope
2852419Sjulian	  it will be ported eventually :)
2952419Sjulian
3052419Sjulian	- Baloney! you can use sizeof(msg) - 1 then.. or just
3152419Sjulian	  make it a macro, then its always portable:
3252419Sjulian
3352419Sjulian	  #ifdef __GNU_C__
3452419Sjulian	    #define NG_MSG_HDR_SIZE	(sizeof(struct ng_message))
3552419Sjulian	  #else
3652419Sjulian	    #define NG_MSG_HDR_SIZE	(sizeof(struct ng_message) - 1)
3752419Sjulian	  #endif
3852419Sjulian
3970700Sjulian	  - inertia rules :-b
4070700Sjulian
4170700Sjulian
4252419Sjulian - Have a user level program to print out and manipulate nodes, etc.
4352419Sjulian	- [DONE]
4470700Sjulian		see ngctl, nghook
4552419Sjulian
4652419Sjulian - "Netgraph global" flags to turn on tracing, etc.
4752419Sjulian
4852419Sjulian - ngctl needs to be rewritten using libnetgraph. Also it needs a
4952419Sjulian   command to list all existing nodes (in case you don't know the
5052419Sjulian   name of what you're looking for).
5152419Sjulian	[DONE]
5252419Sjulian
5352419Sjulian - Need a way to get a list of ALL nodes.
5452419Sjulian	[DONE]
5552419Sjulian	- see NGM_LISTNODES
5652419Sjulian
5752419Sjulian - Enhance "netstat" to display all netgraph nodes -- or at least
5852419Sjulian   all netgraph socket nodes.
5952419Sjulian	[DONE]
6052419Sjulian
6152419Sjulian - BUG FIX: bind() on a socket should neither require nor allow a
6252419Sjulian   colon character at the end of the name. Note ngctl allows you
6352419Sjulian   to do it either way!
6452419Sjulian	[DONE] (I think)
6570700Sjulian	- bind on a control socket has been disabled
6670700Sjulian	  it was a bad idea.
6752419Sjulian
6852419Sjulian - Need to implement passing meta information through socket nodes
6952419Sjulian   using sendmsg() and recvmsg().
7052419Sjulian
7152419Sjulian - Stuff needing to be added to manual:
7252419Sjulian
7352419Sjulian   - Awareness of SPL level, use ng_queue*() functions when necessary.
7470700Sjulian   - Malloc all memory with type M_NETGRAPH. -DONE
7552419Sjulian   - Write code so it can be an LKM or built into the kernel.. this means
7652419Sjulian     be careful with things like #ifdef INET.
7752419Sjulian   - All nodes assume that all data mbufs have the M_PKTHDR flag set!
7852419Sjulian     The ng_send_data() and related functions should have an
79198448Sru     #ifdef DIAGNOSTIC check to check this assumption for every mbuf.
8070700Sjulian     -DONE with INVARIANTS. Framework should test this more.
8152419Sjulian   - More generally, netgraph code should make liberal use of the
82198448Sru     #ifdef DIAGNOSTIC definition.
8370700Sjulian     -INVARIANTS.
8452419Sjulian   - Since data and messages are sent functionally, programmers need
8552419Sjulian     to watch out for infinite feedback loops. Should ng_base.c detect
8652419Sjulian     this automatically?
8752419Sjulian      - I've been thinking about this. each node could have a 'colour'
8852419Sjulian	which is set to the colour of the packet as you pass through.
8952419Sjulian	hitting a node already of your colour would abort. Each packet
9052419Sjulian	has another (incremented) colour.
9170700Sjulian	-new 'item' type can hold a hopcount...
9270700Sjulian
9370700SjulianNEW in 2001
9470700SjulianAll piggyback responses have gone away.
9570700Sjulianuse the node ID in the return address field for quick response delivery.
9670700Sjulian
9770700SjulianEvery node has a queue, plus there is a list of nodes that have queued work.
9870700SjulianExtensive use of Mutexes. Getting in shape for SMP.
9970700Sjulian
10070700SjulianMessages and data are deliverd in a new form. An Item now has
10170700Sjulianall information needed to queue such a request and deliver it later, so 
10270700Sjulianit is now the basis of all data transfer since any transfer may need to
10370700Sjulianbe queued.
104