blob: 0d6715bbe64bf335e243f94df5aefc00d8111dc8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#include <stdio.h>
#include <netinet/in.h>
void output_sa(struct sockaddr_in *sa)
{
printf("sin_len is %d\n", sa->sin_len);
printf("sin_family is %d\n", sa->sin_family);
printf("sin_port is %d\n", sa->sin_port);
printf("sin_addr is %d\n", sa->sin_addr.s_addr);
printf("sizeof is %lu\n", sizeof(sa));
}
|