Search:

Type: Posts; User: JHugh

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. I managed to connect. I had to set an IPv6...

    I managed to connect. I had to set an IPv6 address for the client computer even though I was only using the IPv6 address for the server computer.
  2. Right after the connect() call I used perror()...

    Right after the connect() call I used perror() and got the following message and errno:
    "connect attempt: Network is unreachable"
    errno = 101

    This is strange because I have another computer...
  3. How do I convert this char string into an IPv6 address?

    How do I convert this char string into an IPv6 address for this structure? When I try to connect() it works if myAddress = "::1",but does not work for any other IPv6 address.



    // MAIN
    char...
  4. Replies
    1
    Views
    2,934

    inet_pton IPv6 question

    My code works for the local loopback address "::1". I want to change it so it works for any IPv6 address.

    If I set my server IPv6 computer's address as "fd00::1" and I don't set up any IPv6...
  5. Thanks a lot! It worked perfectly and elegantly....

    Thanks a lot! It worked perfectly and elegantly. :)
  6. Thanks! That makes sense. Do you know of a...

    Thanks!

    That makes sense.

    Do you know of a quick/elegant way to remove all null characters from a string like buffer except the last one?

    E.g. buffer = "hi\0bye\0" becomes "hibye\0"
  7. Sorry; however, I can't post code properly...

    Sorry; however, I can't post code properly because I'm on a work computer. It has a bunch of restrictions and I'm locked into only using an old version of IE with not updated plugins.

    I'd format...
  8. Why does server receive wrong message from client?

    I successfully opened a server and client socket in non-blocking mode.

    Why if I call the client send function twice and then the server receive function once, the server only receives the first...
  9. Replies
    3
    Views
    4,220

    So, when you send data to the client, it...

    So, when you send data to the client, it overwrites data starting at the beginning of the client's buffer each time, instead of appending?

    I'm asking because the IPv6 program that I wrote is...
  10. Replies
    3
    Views
    4,220

    How does send and recv buffer work Linux IPv6?

    When the server sends the data in its buffer, does it append to the client's buffer without any EOL character?

    When the client receives the characters from the buffer does it remove the characters...
  11. Nevermind, I solved it. I was passing sockfd...

    Nevermind, I solved it. I was passing sockfd instead of newsockfd to fcntrl().
  12. It could be that I'm setting up a non-blocking...

    It could be that I'm setting up a non-blocking socket wrong. Is this correct? I think I may be missing the argument in fcntl...

    I really need my company to buy me a good Linux C book... And, my...
  13. Do you want me to post the LabVIEW code (block...

    Do you want me to post the LabVIEW code (block diagram code) that calls my library, or just the C .so library?

    I don't want to post LabVIEW code, if it does not fit here.

    Thanks.
  14. If two sockets attempt to send and recv at the same time will program lock up?

    I have two sockets, which are running on my Linux board under localhost IPv6 (::1). I programmed the .so in C.

    If each socket is running in a separate loop and both sockets call the send() or the...
  15. Thanks. That makes sense.

    Thanks.

    That makes sense.
  16. Would these two reference arguement functions give an error?

    I wrote a shared library which has several functions. I am getting an unknown error when running my code.

    Two of my functions may be called at the same time because I am running my code through...
  17. Replies
    5
    Views
    2,868

    Well, it works in main() so it can't be...

    Well, it works in main() so it can't be completely wrong.

    Guess I'll just have to figure it out by myself.

    Thanks for your answer in the other post. As you can tell, I'm not too familiar with...
  18. Thank you.

    Thank you.
  19. Replies
    5
    Views
    2,868

    Care to elaborate?

    Care to elaborate?
  20. Replies
    5
    Views
    2,868

    Is there a memory leak in my code?

    I wrote this shared object library for an external piece of hardware running Linux. When I run my code in a main() function (not shared object library) on my hardware, it works. However, when I run...
  21. Sorry, I had copied my question over from MS Word...

    Sorry, I had copied my question over from MS Word and the formatting with terrible.

    I did manage to figure out my problem though.

    I had to use the following code in my function to recreate the...
  22. How do I pass pointer structure to function then cast to diff structure

    I'm trying to create a .so in C to interface with an external program. Theexternal program only accepts functions that have pointers to structures in thedefinition. See the comments ‘Broken Function’...
  23. Replies
    3
    Views
    2,304

    Thanks Salem! How do I mark your answer as the...

    Thanks Salem! How do I mark your answer as the solution or give you Kudos/Thanks etc.?
  24. Replies
    3
    Views
    2,304

    How does the memory line up in the structure?

    I am trying to interface with an external program using a shared object C file. To do this, I need to understand how the structure, serv_addr, in my shared library is composed in memory i.e. its data...
  25. Replies
    1
    Views
    979

    How do I pass this structure?

    I am relatively new to C structures, and I have to pass the structure (serv_addr) between these functions. How do I do this?

    Basically, I want to pass the 'structure serv_addr' from the 'main...
Results 1 to 25 of 29
Page 1 of 2 1 2