[osol-code] recursive rw_enter!!

2007-12-15 Thread Neelam
I am facing problems with gld_recv() inside a pseudo network driver. It causing the kernel to panic with recursive rw_enter error. Is there a restriction on how we could call gld_recv()? Because I suspect that problem is because I am calling it in ioctl context!! Thanks, Neelam This

Re: [osol-code] Writing a pseudo network driver

2007-12-10 Thread Neelam
Thanks a lot. It works now. Actually I just blindly followed the Linux convention. -Neelam This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo

[osol-code] problems in sending packets to the driver I wrote

2007-12-09 Thread Neelam
sh rtt,ms rttvar,ms hopcount mtu expire 0 0 0 0 0 0 1500 0 And I tried analyzing using tcpdump, but looks like it's only getting the arp request packet. It's surprising that it's quering for it's own mac address: 19:08:02.102069 arp who-had 192.168.1.1 (Broadcast) tell

Re: [osol-code] How to get the dev_info_t structure, given the name of the networkinter

2007-12-09 Thread Neelam
want my pseudo driver to communicate to another driver. Thanks, Neelam This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Re: [osol-code] How to get the dev_info_t structure, given the name of the networkinter

2007-12-08 Thread Neelam
for every instance? My basic purpose is to to send the packet buffered at the pseudo driver to the default driver. Thanks, Neelam This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http

[osol-code] How to get the dev_info_t structure, given the name of the networkinterface

2007-12-08 Thread Neelam
Hi, Is there a magic function in the kernel to get the dev_info_t structure, given the name of the network interface? I came across get_dev_by_name(). But not quite sure if this is the correct function, plus it's returns a void*!! Thanks, Neelam This message posted from opensolari

Re: [osol-code] Writing a pseudo network driver

2007-12-07 Thread Neelam
sh rtt,ms rttvar,ms hopcount mtu expire 0 0 0 0 0 0 1500 0 And I tried analyzing using tcpdump, but looks like it's only getting the arp request packet. It's surprising that it's quering for it's own mac address: 19:08:02.102069 arp who-had 192.168.1.1 (Broadcast) tell

Re: [osol-code] Writing a pseudo network driver

2007-12-05 Thread Neelam
Thanks Garrett. The problem was somewhere else this time. A valid streamtab struct solved the issue. Thanks a lot for all your help and time. -Neelam This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code

Re: [osol-code] Writing a pseudo network driver

2007-12-05 Thread Neelam
I incorporated the structures. But whenever I try to add the driver, it crashes the kernel and reboots the machine!! This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.o

Re: [osol-code] Writing a pseudo network driver

2007-12-05 Thread Neelam
I think I am doing, what you mentioned in your previous post. Yes I did install the driver with add_drv which created an entry in the /devices/pseudo. Here is the code snippet. Any help will be greatly appreciated. What you might be most interested is the xnet_attach() function. /* cb_ops struc

Re: [osol-code] Writing a pseudo network driver

2007-12-05 Thread Neelam
Thanks for the info. So, now when I called the command "ifconfig xnet0 plumb" it gave me an error "ifconfig: cannot open link "xnet0": DLPI link does not exist ". I had assumed that the gld_register() function should have created a DLPI link. Do I need to do something else to create this link. T

Re: [osol-code] Writing a pseudo network driver

2007-12-05 Thread Neelam
Actually I want the interface to show up as an instance when I type ifconfig. I want it so that kernel can forward packets to that interface when application invoked a send() system call for instance. So I am already using a .conf file having name for the instance. I am able to create an instanc

Re: [osol-code] Writing a pseudo network driver

2007-12-04 Thread Neelam
n you point me to any example code? Thanks a lot, Neelam This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

[osol-code] Writing a pseudo network driver

2007-12-04 Thread Neelam
Hi, I am trying to write a pseudo network driver which basically creates a network interface and acts as a layer between the actual network driver and kernel. Any pointers on creating a pseudo network interface which is not bound to any physical network interface? Thanks, Neelam This