* [Bridge] Can it possible to call the bridge ioctl calls from another module code...
@ 2005-05-10 0:53 srinivas naga vutukuri
2005-05-13 23:33 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: srinivas naga vutukuri @ 2005-05-10 0:53 UTC (permalink / raw)
To: bridge
Hi,
I am using 2.4.x kernel and the kernel native bridge code
(for bridging).
I am creating Pseudo net_devices' which should be added to the bridge
interfaces.
without intervention of bridge-utils (ie., brctl) to add interface
from the userland,
can i able to call the br_ioctl (), br_ioctl_deviceless_stub () which
is calling the static br_ioctl_deviceless () function, which is
adding/deleting the interface from the
bridge. But my doubt is they are not defined as static, am thought global scope,
but no where exported those function symbols, so using directly into
another module is correct way of usage?
Thanks for help in advance.
best regards,
srinivas.
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [Bridge] Can it possible to call the bridge ioctl calls from another module code...
2005-05-10 0:53 [Bridge] Can it possible to call the bridge ioctl calls from another module code srinivas naga vutukuri
@ 2005-05-13 23:33 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2005-05-13 23:33 UTC (permalink / raw)
To: srinivas naga vutukuri; +Cc: bridge
On Tue, 10 May 2005 06:23:24 +0530
srinivas naga vutukuri <srinivas.vutukuri@gmail.com> wrote:
> Hi,
>
> I am using 2.4.x kernel and the kernel native bridge code
> (for bridging).
> I am creating Pseudo net_devices' which should be added to the bridge
> interfaces.
> without intervention of bridge-utils (ie., brctl) to add interface
> from the userland,
> can i able to call the br_ioctl (), br_ioctl_deviceless_stub () which
> is calling the static br_ioctl_deviceless () function, which is
> adding/deleting the interface from the
> bridge. But my doubt is they are not defined as static, am thought global scope,
> but no where exported those function symbols, so using directly into
> another module is correct way of usage?
>
What you need to do is have a socket around and feed sock_ioctl()
the appropriate request. Alternatively, you could simulate user call like
the code in 2.6 br_if.c does to fake ethtool:
strncpy(ifr.ifr_name, dev->name, IFNAMSIZ);
ifr.ifr_data = (void __user *) &ecmd;
old_fs = get_fs();
set_fs(KERNEL_DS);
err = dev_ethtool(&ifr);
set_fs(old_fs);
if (!err) {
Easier to just do something call_usermodehelper or do it all from user mode.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-13 23:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-10 0:53 [Bridge] Can it possible to call the bridge ioctl calls from another module code srinivas naga vutukuri
2005-05-13 23:33 ` Stephen Hemminger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.