fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
I don’t want to output anything via fprintf,but only the result of "Error in pcap_findalldevs: %s\n", errbuf,what’s the function for that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Writes the output and a terminating null to a buffer at ptr, returns the number of characters written excluding the null. Dangerous if you don’t know how big your output should be, it will blindly write past the end of the buffer.
Same as
sprintf, but will write a maximum ofncharacters, including the trailing null. Returns the number of characters that would be written ifnwas large enough, so that you can reallocate your buffer if necessary.Same as
sprintfexcept a double pointer is passed in, the buffer will be resized if necessary to fit the output. This is a GNU extension, also available in BSD, it can be emulated like (Ignoring error checking)