Home | History | Annotate | Download | only in ap

Lines Matching defs:hapd

36 static int fils_dhcp_request(struct hostapd_data *hapd, struct sta_info *sta,
130 addr.sin_addr.s_addr = hapd->conf->dhcp_server.u.v4.s_addr;
131 addr.sin_port = htons(hapd->conf->dhcp_server_port);
132 res = sendto(hapd->dhcp_sock, wpabuf_head(sta->hlp_dhcp_discover),
152 struct hostapd_data *hapd = sock_ctx;
183 if (dhcp->relay_ip != hapd->conf->own_ip_addr.u.v4.s_addr) {
232 sta = ap_get_sta(hapd, dhcp->hw_addr);
240 if (hapd->conf->dhcp_rapid_commit_proxy && msgtype == DHCPOFFER &&
244 if (fils_dhcp_request(hapd, sta, dhcp, end) == 0)
258 wpabuf_put_data(resp, hapd->own_addr, ETH_ALEN);
266 iph->saddr = hapd->conf->dhcp_server.u.v4.s_addr;
274 if (hapd->conf->dhcp_rapid_commit_proxy && msgtype == DHCPACK &&
316 fils_hlp_finish_assoc(hapd, sta);
320 static int fils_process_hlp_dhcp(struct hostapd_data *hapd,
382 if (hapd->conf->dhcp_server.af != AF_INET ||
383 hapd->conf->dhcp_server.u.v4.s_addr == 0) {
389 if (hapd->conf->own_ip_addr.af != AF_INET ||
390 hapd->conf->own_ip_addr.u.v4.s_addr == 0) {
396 if (hapd->dhcp_sock < 0) {
407 if (hapd->conf->dhcp_relay_port) {
411 hapd->conf->own_ip_addr.u.v4.s_addr;
412 addr.sin_port = htons(hapd->conf->dhcp_relay_port);
422 fils_dhcp_handler, NULL, hapd)) {
427 hapd->dhcp_sock = s;
435 dhcp_msg->relay_ip = hapd->conf->own_ip_addr.u.v4.s_addr;
438 addr.sin_addr.s_addr = hapd->conf->dhcp_server.u.v4.s_addr;
439 addr.sin_port = htons(hapd->conf->dhcp_server_port);
440 res = sendto(hapd->dhcp_sock, dhcp_msg, len, 0,
447 eloop_unregister_read_sock(hapd->dhcp_sock);
448 close(hapd->dhcp_sock);
449 hapd->dhcp_sock = -1;
457 if (hapd->conf->dhcp_rapid_commit_proxy && rapid_commit) {
473 static int fils_process_hlp_udp(struct hostapd_data *hapd,
496 return fils_process_hlp_dhcp(hapd, sta, (const u8 *) (udph + 1),
504 static int fils_process_hlp_ip(struct hostapd_data *hapd,
527 return fils_process_hlp_udp(hapd, sta, dst, pos, len);
534 static int fils_process_hlp_req(struct hostapd_data *hapd,
563 return fils_process_hlp_ip(hapd, sta, pos, pkt + 2,
571 int fils_process_hlp(struct hostapd_data *hapd, struct sta_info *sta,
619 if (fils_process_hlp_req(hapd, sta, tmp, tmp_pos - tmp) > 0)
629 void fils_hlp_deinit(struct hostapd_data *hapd)
631 if (hapd->dhcp_sock >= 0) {
632 eloop_unregister_read_sock(hapd->dhcp_sock);
633 close(hapd->dhcp_sock);
634 hapd->dhcp_sock = -1;