[Bridge] brctl insmod

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 29 Jan 2004 12:49:44 -0800
Abhijit Kumbhare <abhijitk@xxxxxxxxxxxxxxxxxx> wrote:

> I noticed that when I type brctl - it does insmod when the bridge module 
> is not loaded. Where can I find the code (in the brctl or libbridge 
> code) which does that?
> 

brctl does an ioctl to get bridge info; it ends up in:
	net/socket.c


static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
		      unsigned long arg)
{
...
	switch (cmd) {
...
		case SIOCGIFBR:
		case SIOCSIFBR:
			err = -ENOPKG;
			if (!br_ioctl_hook)
				request_module("bridge");

			down(&br_ioctl_mutex);
			if (br_ioctl_hook) 
				err = br_ioctl_hook(arg);
			up(&br_ioctl_mutex);
			break;
-- 
Stephen Hemminger 		mailto:shemminger@xxxxxxxx
Open Source Development Lab	http://developer.osdl.org/shemminger


[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux