[patch 11/38] CKRM e18: Change ipaddr_port syntax

From: Gerrit Huizenga
Date: Thu Jun 23 2005 - 01:53:33 EST


Signed-Off-By: Chandra Seetharaman <sekharan@xxxxxxxxxx>
Signed-Off-By: Vivek Kashyap <kashyapv@xxxxxxxxxx>
Signed-Off-By: Gerrit Huizenga <gh@xxxxxxxxxx>

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-ckrm1/kernel/ckrm/ckrm_sockc.c
===================================================================
--- linux-2.6.12-ckrm1.orig/kernel/ckrm/ckrm_sockc.c 2005-06-20 13:08:32.000000000 -0700
+++ linux-2.6.12-ckrm1/kernel/ckrm/ckrm_sockc.c 2005-06-20 13:08:38.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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/