How to use TCP socket in device driver

I want to use network with TCP in device driver in kernel mode.
I am using Solaris 8 x86.
How can I do it?
help!
Are there any examples?
How does the SUN RPC achieve this goal? Can you do some explain for me?

To be clear, here is the sample code, i wrote a TestClass, and i want to send it and read it from the recieving side.
class TestClass{
     String testSting = "i love you";
     int port = 1024;
//send side
TestClass tc = new TestClass();
PrintWriter out=new PrintWriter(socket.getOutputStream());
out.println(tc); //i am not sure if this is right
//send side end
//receive side
BufferedReader buf =new BufferedReader(new InputStreamReader(client.getInputStream()));
//then what can i do to buf to read out TestClass members? buf.readLine()?
//receive side end

Similar Messages

  • How to use tcp socket to receive a class instance

    I've created a class instance c2smsg, then use PS.println(c2smsg) to send the instance to server.
    But how can I receive the class and read the class members at the server side?
    socket.getInputStream() can only receive String, byte[], or int...

    To be clear, here is the sample code, i wrote a TestClass, and i want to send it and read it from the recieving side.
    class TestClass{
         String testSting = "i love you";
         int port = 1024;
    //send side
    TestClass tc = new TestClass();
    PrintWriter out=new PrintWriter(socket.getOutputStream());
    out.println(tc); //i am not sure if this is right
    //send side end
    //receive side
    BufferedReader buf =new BufferedReader(new InputStreamReader(client.getInputStream()));
    //then what can i do to buf to read out TestClass members? buf.readLine()?
    //receive side end

  • How to use TCP Checksum Off-load in my network driver

    I am seeking infomation on how to use TCP Checksum Off-load to tell the Solaris 8 stack not to handle it for both receives and transmits (and let our NIC handle this compute-intensive task instead).
    There is mention that Sun GigabitEthernet Adapter cards, Release 1.1 supports Sol-2.6 use of NIC features: TCP checksum offload & byte swapping
    There are limited bits of info in include files. For example
    sys/strick.h indicates use of:
    inetcksum_t's ick_xmit
    stream.h has:
    struct datab's unsigned u16:16; /* used to store hw-calculated cksum
    #define STRUIO_IP 0x04 /* IP checksum stored in db_struioun */
    #define STRUIO_ZC 0x08 /* mblk eligible for zero-copy */
    strsub.h has:
    struct zero_copy_kstat
    Also /include/inet/tcp.h has tcp_sum for outbound.
    Thank you. -Weimin Tchen

    VenK7337,
    Could you show your python code. so we know what your are "writing" to the ethernet port?
    That way we can see what you are receiving.
    Parsing the incoming data (from the TCP-read) depends heavily on the device that sends it, and can not generically be described. LabVIEW has many byte (and even bit) manipulation functions to convert many different data formats to its own build in formats.
    So after the TCP listener is connected, you are constantly reading from the established connection (until it gets broken of course). More advanced example would be the internet toolkit if oyu have it.
    From the read characters (and I hope you designed a protocol with a clear starting character, ending character and maybe even a build in checksum) you parse the data and perform you action, and of course generate a reply. Again the internet toolkit is a good example. It parsed the input as it comes it, based on the HTTP format. Then generates the reply based on the request received.
    These days I would suggest not to use binairy encoded numerics. Try and use XML formatted data. Yes, it causes a lot of overhead. But typically this is not an issue and makes the code a lot more portable and maintainable. Also makes it easier to interface with other languages/platforms.
    Umless of course you are looking at Khz data rates, then XML is not th preferred choice.
    Hope this helps...

  • How to send packet using tcp socket ?

    hi ,
    i want to using tcp socket to send data in ipv6 environment. but why the data transfer is less than ipv4 environment?
    socket = new Socket("2001:0238:0600::2", 1234);am i wrong ?

    bobby92 wrote:
    why the data transfer is less than ipv4 environment?What do you mean?
    >
    socket = new Socket("2001:0238:0600::2", 1234);am i wrong ?No idea, since I've no idea what you're asking.

  • I am a school administrator. I want to know if anyone knows how to use an ipad wireless hard drive as a storage device for individual student work files  that are only accessible to the student or teacher?

    I need to use an ipad wireless hard drive as a storage device. I want the student to do work on the iPad , then save it securely on the hard drive, then be able to go back and get the file and continue working on it. Can this be done?

    We use google apps for education with the google drive ipad app
    The google drive editor is basic.   But it meets our needs.   Students go to the app called "google drive".  They logon and start a document on an iPad and then edit again using almost any device anywhere(home or school): ipad, windows7, mac, android.    
    We setup each student account with folders for each teacher.  Students can move documents into their teacher folder, and then the teacher can edit in real time with the studnet.   It's like a multi player editor. 
    There's no quick fix to allow students using ipads to save work, then revise alone or with the help of a teacher.
    You could also use skydrive, dropbox, or filebrowser, but the ability of ipad apps to edit and save revisions is spotty.  It depends if that app developer has added support.  You can see your MS Word doc files with those tools, but I don't know if you can edit the DOCX file, then save back to DOCX  files.

  • How to develop 64-bit Windows device driver for NI-6602?

    Due to the fact that NI-VISA doesn’t support 64 bit Windows, how can I do to develop a 64 bit Windows device driver for NI 6602 (Counter/timer) PCI card. The possible jobs include:
    Develop a Windows Kernel Mode Driver (“Device Driver”);
    Make it to comply with VISA in order to utilize “osiBus Generic IO Interface” and MH DDK.
    Could anyone please give me some advices as soon as possible?
    William Liao
    Message Edited by Wiliao on 07-22-2005 04:12 PM

    Hi All,
    I am currently working on getting the health parameters
    from the motherboard like voltage fan and temperature. I have already
    already done this using 32 bit winio driver but i am not able to work
    on 64 bit version. is there any driver availbale in 64 bit for
    obtaining this parametes or some one help me to get a 64 bit winio
    driver.
    Regards,
    Senthil prabu R

  • Communication with database using TCP sockets connection

    Hi all,
    I am bit of a newbie when it comes to databases. In a project I realised over te passed few weeks, I communicated with an 11g database using an application I created with VS Express. It uses an ODBC connection. I now want to connect a PLC to the same database. These PLC's don't have the ability to install an ODBC client so I need something different.
    I am easily able to open a TCP socket on the PLC and send data from there. I would like to know if I can start a TCP sockets connection with our 11g server and send all queries directly. The other (already suggested) option would be to have the PLC connect to a PC that reads this information and hands it over to the ODBC connector, but that would mean I need an extra PC just to 'translate'.
    I have been searching these forums for socket, TCP and more and feel it is possible, but I need a good document as a reference to show/tell me how it's done.
    Thanks in advance,
    Marijn

    The TCP/IP interface to Oracle is undocumented (and hugely complex anyway). You'll need to use a higher layer iterface or setup your own infrastructure.
    We need more information about what is available to you inside the PLC.
    Can you use Java? If so, perhaps use thin JDBC?
    Can you sent HTTP requests? If so you could set up your own Web services to handle this.
    If you can only use C or C++, Oracle has interfaces there too.. it's called OCI (Oracle Call Interface) and thats as close to the networking layer as you can get.
    Finally if you can use .NET Oracle has a Fully Managed Oracle Data Provider for .NET that you could use.
    But if all you can do is super low level network access and none of the above then you will need to set up an intermediary as you mentioned.

  • How to use more than one device under same apple ID?

    How do you you use more than one device under same apple ID? say for facetime?

    You don't. One Device and one Apple ID.

  • How do I distribute NI visa device driver?

    I am trying to write an installer for a device driver made with NI-Visa Driver wizard. I encountered some problems and I am trying to figure out what is wrong. The installer generator I am using, Setup Factory, mimics the command:
    C:\Windows\System32\rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 filename.inf
    When I run this command, Device Manger knows the the device is our device because it shows up as a NI-PXI device but it has a yellow exclaimation on it indicating the device has not been configured correctly. I also tried right clicking on the INF file and the same thing occurs. 
    I was wondering if I was doing something wrong or am missing another command. I noticed that there was an .INI file the driver wizard generated.
    The driver installs correctly when I go into device manager right click on the device and update driver as well as at the end of the NI-Visa driver wizard, it prompts to install for me. 
    Thanks,
    Daniel

    Hello Daniel,
    Unfortunately we do not have documentation to support Setup Factory. Have you tried contacting their support? In your post you say that the driver installs correctly in device manager and with the NI-VISA driver wizard, is this correct? I'm sorry we can't help more!
    Mychal F
    Applications Engineer
    National Instruments

  • HT201250 How to Use One Time Machine External Drive to Back Up Two Macs

    How do I set up two computers -- an iMac and a MacBook, both running Mountain Lion -- to use a single external hard drive for Time Machine backups?
    Both are on an Airport Extreme network

    Yes, it does.
    I took it from there and the iMac is now backing up its contents on the HD.
    Thanks very much for your knowledgeable and prompt help.
    Best regards,
    ed

  • How to use USB Flash Key Pen Drive in Sun Ray?

    Hello gentlemen,
    Can anyone help me witn USB Flash Key Pen Drive in Sun Ray?
    Every Sun Ray appliance has USB-ports and ammount of them more than default USB-set: Keyboard+mouse.
    The idea: to use one of the rest USB-ports in appliance for USB Flash Key Pen Drive.
    I've tried to find the solution in Sun Ray Documents.
    The result was "zero".
    Can anybody answers the following questions too :
    1. Generaly speaking, is it possible to use USB Flash Key Pen Drive under Solaris/Sun Ray Server Soft?
    2. If exists compatibility list of "Solaris Sun Ray Configurations - USB Flash Key Pen Drive Models" - how can I see it?
    3. Is there anywhere resources on USB Flash Key Pen Drive connection under SPARC-Solaris?
    Thanks in advance!
    Vladimir.

    http://wiki.archlinux.org/index.php/AutoFS_HowTo might be interesting

  • How do I install the Apple device driver on my laptop?

    My iPhone 4 is stuck on the "connect to iTunes" screen and won't enter recovery mode after trying to update my phone to iOS 7.0.2. My laptop "can't find a device driver" and iTunes won't detect my phone at all, neither will my laptop. I need help with this problem. I have tried uninstalling the orginal device driver and I can't find a device driver downoad on Apple's website to replace it, so now I have no driver whatsoever. I have "held the home button down for about 15 seconds" whilst the phone was on and again while it was off. Is this a problem many people are having?
    Many thanks, Joe

    Hi there Joe Foxwell,
    I would recommend taking a look at the troubleshooting steps found in the article below.
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    -Griff W.

  • HT201250 How to use time machine external hard drive on other devices

    I have an external hard drive which i usually use to back up my macbook pro via time machine but if i put pictures or songs on the external hard drive and connect it to a gaming concole or a pc nothing happens. The concole and pc doesn't recognize the device. Is there anything i can do to make it so i can access files from other devices while still using it for time machine?

    The external drive is Mac formatted for Time Machine. Your gaming console and PC won't be able to read its format.
    If you are determined to use it for both purposes, you can partition the drive in Disk Utility. Format the PC partition for MS-DOS or whatever is required for your gaming console. You may or may not have sufficient space for both partitions. If you do not you will have to erase your Time Machine backups.

  • How to use the same external hard drive for OSX and XP

    Hello to all. First off, thanks for all of the helpful comments that have been posted in the discussion board, they have helped me a lot with my problems and curiosities. My question has been touched on in the past, but nothing concrete so I figured I'd ask a bit more specifically.
    I recently loaded Windows XP (FAT32)onto my MacBook. Everything is running smoothly, but I was just curious how I could format my external HD so that both operating systems can read it, i.e. I only have 20 GB's partitioned for Windows XP, and i'll be using it to download music and movies. I would like to be able to play these straight from my external rather than use up the disc space. Let me know if anybody can help! Thanks.

    Unfortunately, Disk Utility doesn't just move everything around. It has to erase everything, and then resize. I find it a little odd, seeing as other disk utilities can resize everything just fine. Anyway, yes, you will have to erase your drive to reformat it as FAT32. What I usually do is try to copy everything from the drive to free space in the internal drives. I haven't had too much data on my drive yet, so I've been lucky so far. I don't know if you have enough free space on whatever drives you have, but that's probably the best way to do it.
    1) Transfer everything over to a folder on the internal drive
    2) Use Disk Utility to reformat the drive as FAT32
    3) Transfer everything back to the external drive
    2.0GHz MacBook 1st Gen   Mac OS X (10.4.8)   2GB RAM

  • How to use iMessage on two devices

    How can I use iMessage on both my iPhone and iPad.  iPad tells me "email already in use?

    Nickchrist wrote:
    I have the same problem ie "How can I use iMessage on both my iPhone and iPad.  iPad tells me "email already in use? " and i dont know how to fixed it.. Pls help!!
    Don't tag your question/request onto a post that's about a year old. You usually won't get an answer. Start a New Discussion post with your own unique question.
    Put a new email address - gmail? - on your iPad.
    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    For non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
     Cheers, Tom

Maybe you are looking for

  • Acount activation issues for a new hard drive immage

    I have recently gotten my office PC updated to Win 7 with a fresh install and newly installed iTunes 10. When i try to activate iTunes I get the prompt to activate it. So far so goo. However when I enter my password and hit activate I get a follow up

  • Error in dump file

    Hi, I am getting below error in one of the dump file created in /udump directory but I am not sure if this is a warning of some disaster or what: kvotlgev: epc event: 9 failed. EPC error: 167 But I could not see any error in alert log related to this

  • Alter table taking long time

    Hi we have problem with one of our tables we are trying to add a column to that table and it hangds I am trying to drop the table and it still hangs nor can i rename that table to a diff table name i killed the SQL session and in one of trace files g

  • The lovely error -36

    Help! I looked at the FAQ on the apple site for the error 36, but I still can't get my ipod to sync with my computer. Things were going fine, but all of a sudden, it freaked out and stopped uploading songs from my library (most are from cds I've impo

  • BSP data from different user mixed up

    Hello, Our stateful BSP application is called from the portal. How can it be possible that two different users at two different locations with different session id's can see information from the other person? Best regards Sander