This commit was manufactured by cvs2svn to create branch
[linux-2.6.git] / include / linux / ckrm_net.h
1 /* ckrm_rc.h - Header file to be used by Resource controllers of CKRM
2  *
3  * Copyright (C) Vivek Kashyap , IBM Corp. 2004
4  * 
5  * Provides data structures, macros and kernel API of CKRM for 
6  * resource controllers.
7  *
8  * Latest version, more details at http://ckrm.sf.net
9  * 
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  */
16
17 #ifndef _LINUX_CKRM_NET_H
18 #define _LINUX_CKRM_NET_H
19
20 struct ckrm_sock_class;
21
22 struct ckrm_net_struct {
23         int ns_type;            // type of net class
24         struct sock *ns_sk;     // pointer to socket
25         pid_t ns_tgid;          // real process id
26         pid_t ns_pid;           // calling thread's pid
27         struct task_struct *ns_tsk;
28         int ns_family;          // IPPROTO_IPV4 || IPPROTO_IPV6
29         // Currently only IPV4 is supported
30         union {
31                 __u32 ns_dipv4; // V4 listener's address
32         } ns_daddr;
33         __u16 ns_dport;         // listener's port
34         __u16 ns_sport;         // sender's port
35         atomic_t ns_refcnt;
36         struct ckrm_sock_class *core;
37         struct list_head ckrm_link;
38 };
39
40 #define ns_daddrv4     ns_daddr.ns_dipv4
41
42 #endif