use libc to parse post