[comp.protocols.tcp-ip.ibmpc] Packet Driver questions

nelson@sun.soe.clarkson.edu (Russ Nelson) (07/24/88)

I have a few questions that aren't answered by the packet driver spec.  Can
anyone help me?

I have version 1.05--is there a later version?


access_type():
What is the range of if_number?
When should access_type return BAD_HANDLE?  When out of handles?
When should access_type return TYPE_INUSE?  When the packet type is in use?
Why is typelen a parameter?
Isn't it a fixed quantity for each interface class?
What if I don't have enough space to store their type? Return NO_SPACE?

terminate():
Sounds like the driver shouldn't terminate until and unless all handles have
either been released.  What if a call to terminate() has been made, and
there are other handles in use?  Should the driver terminate after the
last handle has been released?  Sounds like terminate() requires a handle
that *hasn't* been released.  If it returns CANT_TERMINATE, should it also
release the handle?

-- 
nelson@clutx.bitnet, nelson@clutx.clarkson.edu, uunet!clutx.clarkson.edu!nelson

jbvb@VAX.FTP.COM (James Van Bokkelen) (07/25/88)

if_number is somewhat of an appendix.  Due to other aspects of the design
(no handle on the send_pkt call), the only reasonable value is 0.

access_type() can return BAD_HANDLE when out of handles.  TYPE_INUSE is
intended for just that situation: someone else has already claimed either
the type specified or some superset of it.  NO_SPACE is intended for any
kind of resource exhaustion that makes the access_type() fail.

typelen is a parameter to allow for situations (802.2 packet headers is the
only case I can think of at the moment) where the match length varies.  With
802.2 headers, one application might want all packets with SSAP 1, and another
might want SSAP = 1, DSAP = 2, etc.  In conventional Blue-Book Ethernet,
typelen is effectively a constant, 2.

I hadn't throught about terminate() much.  Seems like a good idea to release
the handle, whether or not the call succeeds.  This would allow an application
to attempt to free up all memory by closing all its handles that way (although
if this succeeded, the packet driver would need to be re-started before another
network program could run).

jbvb