#include #include #include "rtp.h" int main(void) { rtp_hdr_t hdr; u_char *buf; u_char buf2[30]; hdr.version = 1; hdr.p = 0; hdr.x = 0; hdr.cc = 3; hdr.m = 0; hdr.pt = 6; hdr.seq = 255; buf = (u_char *)&hdr; for(u_int i=0; i< sizeof(hdr); i++) { if(!(i%8)) printf("\n"); printf("%02x ", buf[i]); } printf("\n"); printf("sizeof buf2 = %d bytes\n", sizeof(buf2)); return 0; }