Re: [mpls-linux-general] (no subject)
Status: Beta
Brought to you by:
jleu
From: James R. L. <jl...@mi...> - 2002-03-22 15:59:29
|
I have never tried to do this. Why do you want to? Jim On Fri, Mar 22, 2002 at 09:06:30AM -0000, anish verma wrote: > hi, > i am working on MPLS regarding that i want to open a file from=20 > kernel to store ip address of the destination of forwarded pkt.. > for which i am using the code below in mpls_ouput function .. >=20 > char *buffer =3D kmalloc(4096,GFP_KERNEL); > oldfs =3D get_fs(); > set_fs(KERNEL_DS); > fd=3Dopen("/dev/test",O_RDWR,0); > if(fd){ > =A0 read(fd,buffer,BUFFSIZE); > } > close(fd); > set_fs(oldfs); >=20 > but as soon as i ping another m/c my PC hangs.. > can u please tell what is wrong with the above code.. > whether i should use some lock... or is there any other method of=20 > opening a file from kernel > thanx in advance > anish >=20 > _______________________________________________ > mpls-linux-general mailing list > mpl...@li... > https://lists.sourceforge.net/lists/listinfo/mpls-linux-general --=20 James R. Leu |