lkml.org 
[lkml]   [2005]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[patch 11/21] CKRM: Change ipaddr_port syntax
From
--
Content-Disposition: inline; filename=06b-ckrm_sockc


Signed-Off-By: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-Off-By: Vivek Kashyap <kashyapv@us.ibm.com
Signed-Off-By: Gerrit Huizenga <gh@us.ibm.com>

Change the ipaddr_port syntax from "xxx.xxx.xxx.xxx\\YY" to
"xxx.xxx.xxx.xxx:YY" to make it easy for cut-n-paste.


ckrm_sockc.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
Index: linux-2.6.12-rc3-ckrm5/kernel/ckrm/ckrm_sockc.c
===================================================================
--- linux-2.6.12-rc3-ckrm5.orig/kernel/ckrm/ckrm_sockc.c 2005-05-05 09:35:09.000000000 -0700
+++ linux-2.6.12-rc3-ckrm5/kernel/ckrm/ckrm_sockc.c 2005-05-05 09:36:27.000000000 -0700
@@ -343,7 +343,7 @@ static int ckrm_sock_show_members(struct
class_lock(core);
list_for_each(lh, &core->objlist) {
ns = container_of(lh, struct ckrm_net_struct, ckrm_link);
- seq_printf(seq, "%d.%d.%d.%d\\%d\n",
+ seq_printf(seq, "%d.%d.%d.%d:%d\n",
NIPQUAD(ns->ns_daddrv4), ns->ns_dport);
}
class_unlock(core);
@@ -459,7 +459,7 @@ ckrm_sock_forced_reclassify(struct ckrm_
return -EPERM;
if (id != 0)
return -EINVAL;
- printk("ckrm_sock_class: reclassify all not net implemented\n");
+ printk("socketclass: reclassify all not implemented yet\n");
return 0;
}

@@ -478,15 +478,15 @@ ckrm_sock_forced_reclassify(struct ckrm_
while (*p2 && (*p2 != '='))
++p2;
p2++;
- p2 = v4toi(p2, '\\', &(v4addr));
+ p2 = v4toi(p2, ':', &(v4addr));
ns.ns_daddrv4 = htonl(v4addr);
ns.ns_family = AF_INET;
- p2 = v4toi(++p2, ':', &tmp);
+ p2 = v4toi(++p2, '/', &tmp);
ns.ns_dport = (__u16) tmp;
if (*p2)
p2 = v4toi(++p2, '\0', &ns.ns_pid);
ckrm_sock_forced_reclassify_ns(&ns, target);
- break;
+ return 0;

case IPV6:
printk(KERN_INFO "rcfs: IPV6 not supported yet\n");
--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-05-05 21:12    [from the cache]
©2003-2011 Jasper Spaans