tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: LInked list representation for packet classes in the device - "Create an in-kernel api for packet classes "



Thanks for your suggestions.

Classes are capabilities of the driver to categorize the traffic. For
ex, an Ethernet card with 2 transmit rings may register "hipri" and
"lopri" classes.

int register_packet_class( char*  interface_name, char* class_name).
This API is called for each class identified by the driver where, it
writes the classes to the device returning the token number assigned
to the caller.

And, I don't have any idea of API used by Packet filter yet.

Anish

On Sat, Jun 28, 2008 at 2:18 PM, Herb Peyerl <hpeyerl%beer.org@localhost> wrote:
>
> On 28-Jun-08, at 11:35 AM, Matt Thomas wrote:
>
>>
>> On Jun 28, 2008, at 9:48 AM, Anish wrote:
>>
>>> Hi ,
>>>
>>> I am working on the project  ' Create an in-kernel API for packet
>>> classes'. During the registration part, where drivers register their
>>> tokens with a pseudo device, I want to maintain a linked list of all
>>> classes in the device as shown below.
>>>
>>> struct interface_struct{
>>>
>>> char*  interface_name;
>>> interface_struct * if_list;
>>> class_struct *class_list;
>>> };
>>>
>>> struct class_struct{
>>> char* class_name;
>>> int token_id;
>>> class_struct *class_list;
>>> };
>>
>> Use the macros from <sys/queue.h>
>>
>> What are the classes used for?  How frequently?
>
> Yes, and more interestingly, what API have you planned for drivers to
> register/un-register classes, packet filters to register their handlers, or
> what have you... That's where the bulk of the thought comes in...
>
>


Home | Main Index | Thread Index | Old Index