I want to take a substring of the string buffer by doing something like the below. I don't know if it's possible (I've been coding in C for all of about 6 hrs now, but feel free to be as technical as you like, I think I can handle it (though I may be wrong))
Edit: I want to take a substring of buffer from the beginning of buffer to the first space.
if (buffer[c] == ' ') {
in_addr_t addr;
char *ptr = *buffer;
if(inet_aton("*ptr to *ptr+c", &addr)!=0){
//do stuff;
}
}