终于找到了: 部分内容 ping的源代码 #pragma pack(4) #define WIN32_LEAN_AND_MEAN #include #include #include #define ICMP_ECHO 8 #define ICMP_ECHOREPLY 0 #define ICMP_MIN 8 // minimum 8 byte icmp packet (just header)