Search Result

Collapse
2 results in 0.0024 seconds.
Keywords
Members
Tags
ipv4
  •  

  • Error downloading video streams from metacafe via inet_ntop()

    I've written a program to download the video streamed from different sites to my computer,
    everything works fine with youtube or other sites but when I try to get the IP of Metacafe, inet_ntop() returns NULL.

    this is the code I'm using: (address will be stored in ip)
    Code:
    struct hostent *hent;
    size_t iplen = 15; //XXX.XXX.XXX.XXX
    char *ip = (char *)malloc(iplen+1); //this is our address
    
    memset(ip,
    ...
    See more | Go to post

  • GujjuNilesh
    started a topic How to validate IPv4 & IPv6 in C?
    in C

    How to validate IPv4 & IPv6 in C?

    Hi,

    I would like to write a program, and which is going to have multiple IP addresses (can be v4 or v6) as input, and on the return I need to print which IP addresses are valid and which aren't.

    The term 'valid' means :
    1. It is not necessary to have IP in same subnet / network.
    2. It does not matter if given IP fails to ping.
    3. For IPv4, there should be 4 bots, and all number have to be in between...
    See more | Go to post
Working...