When I use following statement in the code which runs on ARM9, it does not correctly parse the IP address. I am using standard function for sscanf().
main() { unsigned char ip[16]; sscanf("255.1.1.1","%u.%u.%u.%u",&ip[0],&ip[1],&ip[2],&ip[3]); }
thanks in advance, -pjs
Thanks a lot for the detailed answers ! I have handcoded small function then to parse the string into four ascii words and converted it to corresponding integer values, which works correctly. Thanks again for your time.