Example #1
0
/**
 * Print short information about outgoing data to stdout.
 * @param to Pointer to the address of the peer.
 * @param len Number of bytes sent.
 */
void print_output( struct sockaddr_storage *to, int len)
{
        printf("> ");
        print_ss(to);
        printf(" (%d bytes)", len);
        printf("\n");
}
Example #2
0
/**
 * Print short information about incoming data to stdout.
 * @param from Pointer to the address of the peer.
 * @param len Number of bytes received. 
 * @param flags The flags from recvfrom() containing additional information.
 * @param info Pointer to struct sndrcvinfo, if non-NULL then also information
 * contained in this struct is printed. 
 */
void print_input( struct sockaddr_storage *from, int len, int flags, 
                struct sctp_sndrcvinfo *info)
{

        printf("< ");
        print_ss(from);
        printf(" (%d bytes) ", len);
        if ( !(flags & MSG_EOR) )
                printf("[partial]");

        printf("\n");
        if (info != NULL) {
                printf("\t stream: %d ppid: %d context: %d\n", info->sinfo_stream, 
                                info->sinfo_ppid, info->sinfo_context );
                printf("\t ssn: %d tsn: %u cumtsn: %u ", info->sinfo_ssn, 
                                info->sinfo_tsn, info->sinfo_cumtsn );
                printf("[");
                if ( info->sinfo_flags & SCTP_UNORDERED ) 
                        printf("un");
                printf("ordered]\n");
        }
}
Example #3
0
void
warn_SS(Warn s, String *a, String *b)
{
	print_ss(wmsg[s], a, b);
}