As the functions vfprintf, vfscanf, vprintf, vscanf, vsnprintf, vsprintf, and vsscanf invoke the va_arg macro, the value of [args] after the return is indeterminate.
What needs to be done instead is to wrap each invocation of pcap*snprintf with its own pair of va_start and va_end.