Lines Matching refs:peer_data

50 static struct app_data peer_data = {  variable
358 &peer_data.peer); in get_peer_address()
364 if (net_sin(&peer_data.peer)->sin_port == 0) { in get_peer_address()
365 net_sin(&peer_data.peer)->sin_port = htons(4242); in get_peer_address()
369 peer_data.peer.sa_family == AF_INET6) { in get_peer_address()
371 &net_sin6(&peer_data.peer)->sin6_addr); in get_peer_address()
373 net_addr_ntop(peer_data.peer.sa_family, in get_peer_address()
374 &net_sin6(&peer_data.peer)->sin6_addr, addr_str, in get_peer_address()
376 peer_data.peer_addr_len = sizeof(struct sockaddr_in6); in get_peer_address()
379 peer_data.peer.sa_family == AF_INET) { in get_peer_address()
381 &net_sin(&peer_data.peer)->sin_addr); in get_peer_address()
383 net_addr_ntop(peer_data.peer.sa_family, in get_peer_address()
384 &net_sin(&peer_data.peer)->sin_addr, addr_str, in get_peer_address()
386 peer_data.peer_addr_len = sizeof(struct sockaddr_in); in get_peer_address()
566 struct sockaddr_ll *addr = (struct sockaddr_ll *)&peer_data.peer; in main()
570 peer_data.peer_addr_len = sizeof(struct sockaddr_ll); in main()
592 peer_data.clk = net_eth_get_ptp_clock_by_index(if_index); in main()
593 if (!peer_data.clk) { in main()
613 ntohs(net_sin(&peer_data.peer)->sin_port), in main()
614 if_index, iface, peer_data.clk); in main()
620 if_index, iface, peer_data.clk); in main()
623 peer_data.sock = create_socket(iface, &peer_data.peer); in main()
624 if (peer_data.sock < 0) { in main()
625 LOG_ERR("Cannot create socket (%d)", peer_data.sock); in main()
631 tx, &peer_data, in main()
643 rx, &peer_data, in main()
663 if (peer_data.sock >= 0) { in main()
664 (void)close(peer_data.sock); in main()