Lines Matching refs:localhost

657 fake_listener_create(struct sockaddr_in *localhost)  in fake_listener_create()  argument
659 struct sockaddr *sa = (struct sockaddr *)localhost; in fake_listener_create()
661 ev_socklen_t slen = sizeof(*localhost); in fake_listener_create()
663 memset(localhost, 0, sizeof(*localhost)); in fake_listener_create()
664 localhost->sin_port = 0; /* have the kernel pick a port */ in fake_listener_create()
665 localhost->sin_addr.s_addr = htonl(0x7f000001L); in fake_listener_create()
666 localhost->sin_family = AF_INET; in fake_listener_create()
670 fd = socket(localhost->sin_family, SOCK_STREAM, 0); in fake_listener_create()
731 struct sockaddr_in localhost; in test_bufferevent_connect() local
757 memset(&localhost, 0, sizeof(localhost)); in test_bufferevent_connect()
759 localhost.sin_port = 0; /* pick-a-port */ in test_bufferevent_connect()
760 localhost.sin_addr.s_addr = htonl(0x7f000001L); in test_bufferevent_connect()
761 localhost.sin_family = AF_INET; in test_bufferevent_connect()
762 sa = (struct sockaddr *)&localhost; in test_bufferevent_connect()
765 16, sa, sizeof(localhost)); in test_bufferevent_connect()
785 tt_want(!bufferevent_socket_connect(bev1, sa, sizeof(localhost))); in test_bufferevent_connect()
786 tt_want(!bufferevent_socket_connect(bev2, sa, sizeof(localhost))); in test_bufferevent_connect()
821 struct sockaddr_in localhost; in test_bufferevent_connect_fail_eventcb() local
823 ev_socklen_t slen = sizeof(localhost); in test_bufferevent_connect_fail_eventcb()
827 fake_listener = fake_listener_create(&localhost); in test_bufferevent_connect_fail_eventcb()
840 r = bufferevent_socket_connect(bev, (struct sockaddr *)&localhost, slen); in test_bufferevent_connect_fail_eventcb()
895 struct sockaddr_in localhost; in test_bufferevent_connect_fail() local
896 ev_socklen_t slen = sizeof(localhost); in test_bufferevent_connect_fail()
902 fake_listener = fake_listener_create(&localhost); in test_bufferevent_connect_fail()
908 r = bufferevent_socket_connect(bev, (struct sockaddr *)&localhost, slen); in test_bufferevent_connect_fail()
1147 struct sockaddr_in localhost; in test_bufferevent_trigger() local
1165 memset(&localhost, 0, sizeof(localhost)); in test_bufferevent_trigger()
1167 localhost.sin_port = 0; /* pick-a-port */ in test_bufferevent_trigger()
1168 localhost.sin_addr.s_addr = htonl(0x7f000001L); in test_bufferevent_trigger()
1169 localhost.sin_family = AF_INET; in test_bufferevent_trigger()
1170 sa = (struct sockaddr *)&localhost; in test_bufferevent_trigger()
1173 16, sa, sizeof(localhost)); in test_bufferevent_trigger()
1189 tt_want(!bufferevent_socket_connect(bev, sa, sizeof(localhost))); in test_bufferevent_trigger()