Discussion:
LInked list representation for packet classes in the device - "Create an in-kernel api for packet classes "
(too old to reply)
Anish
2008-06-28 16:48:12 UTC
Permalink
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;
};


if_1 ------> if_2 -----------> if_3 -----------> if_4 ------------------> if_5
| | | |
|
| | | |
|
v v v v
v
class_1
|
|
v
class_2

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Matt Thomas
2008-06-28 17:35:02 UTC
Permalink
Post by Anish
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?

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Herb Peyerl
2008-06-28 19:18:06 UTC
Permalink
Post by Matt Thomas
Post by Anish
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...


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Anish
2008-06-30 15:06:24 UTC
Permalink
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
Post by Herb Peyerl
Post by Matt Thomas
Post by Anish
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...
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...