1 /* ckrm_rc.h - Header file to be used by Resource controllers of CKRM
3 * Copyright (C) Vivek Kashyap , IBM Corp. 2004
5 * Provides data structures, macros and kernel API of CKRM for
6 * resource controllers.
8 * Latest version, more details at http://ckrm.sf.net
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.
17 #ifndef _LINUX_CKRM_NET_H
18 #define _LINUX_CKRM_NET_H
20 struct ckrm_sock_class;
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
31 __u32 ns_dipv4; // V4 listener's address
33 __u16 ns_dport; // listener's port
34 __u16 ns_sport; // sender's port
36 struct ckrm_sock_class *core;
37 struct list_head ckrm_link;
40 #define ns_daddrv4 ns_daddr.ns_dipv4