Lines Matching refs:message
31 strncpy(sender->message.body, msg, len);
34 sender->message.header.seq = ntohs(sender->message.header.seq) + 1;
35 sender->message.header.seq = htons(sender->message.header.seq);
36 sender->message.header.ts = ntohl(sender->message.header.ts) + 1;
37 sender->message.header.ts = htonl(sender->message.header.ts);
40 stat = srtp_protect(sender->srtp_ctx, &sender->message.header, &pkt_len);
48 srtp_print_packet(&sender->message.header, pkt_len);
50 octets_sent = sendto(sender->socket, (void*)&sender->message,
56 fprintf(stderr, "error: couldn't send message %s", (char *)msg);
69 octets_recvd = recvfrom(receiver->socket, (void *)&receiver->message,
73 if (receiver->message.header.version != 2) {
80 octets_recvd, receiver->message.header.ssrc);
83 srtp_print_packet(&receiver->message.header, octets_recvd);
88 &receiver->message.header, &octets_recvd);
96 strncpy(msg, receiver->message.body, octets_recvd);
108 sender->message.header.ssrc = htonl(ssrc);
109 sender->message.header.ts = 0;
110 sender->message.header.seq = (uint16_t) rand();
111 sender->message.header.m = 0;
112 sender->message.header.pt = 0x1;
113 sender->message.header.version = 2;
114 sender->message.header.p = 0;
115 sender->message.header.x = 0;
116 sender->message.header.cc = 0;
132 rcvr->message.header.ssrc = htonl(ssrc);
133 rcvr->message.header.ts = 0;
134 rcvr->message.header.seq = 0;
135 rcvr->message.header.m = 0;
136 rcvr->message.header.pt = 0x1;
137 rcvr->message.header.version = 2;
138 rcvr->message.header.p = 0;
139 rcvr->message.header.x = 0;
140 rcvr->message.header.cc = 0;