Will it be useful to provide a mechanism to notify user when hook dependency 
changes (e.g., an event or callback)?  For the filter->compression->encryption 
example, user may first try to register his callback before compression.  But 
if  compression does not exist, user can register his cb before encryption.  If 
 compression is inserted later, user module can be notified and take 
appropriate action. 

Another thought is to add an option IMMEDIATELY_BEFORE v.s. just BEFORE.  For 
the above example, user can register his callback as BEFORE encryption if 
compression does not exist.  If later compression is inserted as 
IMMEDIATELY_BEFORE encryption, then user's callback dependency is still valid 
since it does not mind whether it is immediately or several callbacks before 
encryption callback.   It is even possible that if user choose to insert his 
callback just BEFORE encryption, and compression has been inserted as 
IMMEDIATELY_BEFORE encryption, then the HOOKAPI can automatically adjust the 
insertion point to before compression - this satisfies user requirement without 
breaking existing dependencies......


Xiaobo
 
 
This message posted from opensolaris.org
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to