Ramakrishnan Meenakshi Sundaram writes: > Thanks a lot Rao. I'll do that [...] > In this case your only option seems to be to use vn_open() and read the > file. See ncaportconf_read() in common/fs/sockfs/nl7c.c for an example.
It might be good for you to post a little more detail about what you're doing, and why it involves reading and writing files. In general, you shouldn't be manipulating files directly from within a STREAMS module or driver. If you do, you'll be tying yourself to interfaces that are _not_ stable. Your software may well fail unexpectedly due to patches -- and take the rest of the system with it. I wouldn't recommend relying on vn_open() unless your code is going to be integrated into the ON consolidation in OpenSolaris. Sure, the last time the arguments on that function changed was about 9 years ago, but there's no guarantee going forward that it won't change again. And if it does, there won't be any notice to anyone using it, because it's not a documented interface. Besides driver.conf, which is a static configuration mechanism, there are a number of options available to you. An obvious and simple one is to have a process in user space that uses ioctls to send and receive the necessary information. -- James Carlson, Solaris Networking <[EMAIL PROTECTED]> Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677 _______________________________________________ networking-discuss mailing list [email protected]
