Find the answer to your Linux question:
Results 1 to 2 of 2
Hi everyone. I am a noob to linux programming. I am programming a small application in C. I need to pass around all the IPv4 and Ipv6 settings to different ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2006
    Posts
    17

    programming in IPv4 and IPv6 settings in linux


    Hi everyone. I am a noob to linux programming.

    I am programming a small application in C.

    I need to pass around all the IPv4 and Ipv6 settings to different functions.

    Is there a structure out there in linux land that already exists for packing up IPv4 and IPv6 settings (address, netmask, gateway, etc)?

    Or do I need to define my own structure?

    thanks

  2. #2
    Linux Newbie
    Join Date
    Mar 2010
    Posts
    152
    See this guide, particularly section 9.24 "struct sockaddr and pals". Also look up getaddrinfo() and inet_pton().

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •