forked from intel/openlldp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ecp22 add notify module call back function
Add a module call back function named notify. The prototype is int (*notify)(int, char *, void *); It has 3 parameters: 1. The senders module identifier. 2. The interface name the modications apply to. 3. The changed data itself as an opaque data structure. The data structure is sender and receipient specific. The function returns true if the changes have been applied successfully by the receiving module and false otherwise. The module might not be loaded, or the interface not active or the data simple not understood. The data is an overlay of structures, the first member identifies the type of the data structure: struct qbg22_imm { /* Intermodule message data structure */ int data_type; /* Identifies union data */ union { /* Overlay possible data */ struct evb22_to_ecp22 a; struct evb22_to_vdp22 b; } u; }; For example the EVB Module wants to notify the ECP module about some parameter changes, then ECP module offers a notify call back function. EVB module calls it like: EVB-modops->notify(EVB_MOD_ID, "ethx", &qbg22_data); with qbg22_data.data_type indicating which union member to use to extract the data. Signed-off-by: Thomas Richter <[email protected]> Signed-off-by: John Fastabend <[email protected]>
- Loading branch information
Thomas Richter
authored and
John Fastabend
committed
Jan 20, 2013
1 parent
92963cb
commit 36a641e
Showing
4 changed files
with
189 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters