wpa_supplicant / hostapd
2.5
|
UPnP SSDP for WPS Copyright (c) 2006-2007 Sony Corporation Copyright (c) 2008-2009 Atheros Communications Copyright (c) 2009-2013, Jouni Malinen j@w1. fiMore...
#include "includes.h"
#include <fcntl.h>
#include <sys/ioctl.h>
#include <net/route.h>
#include "common.h"
#include "uuid.h"
#include "eloop.h"
#include "wps.h"
#include "wps_upnp.h"
#include "wps_upnp_i.h"
Functions | |
void | advertisement_state_machine_stop (struct upnp_wps_device_sm *sm, int send_byebye) |
Stop SSDP advertisements. More... | |
int | advertisement_state_machine_start (struct upnp_wps_device_sm *sm) |
Start SSDP advertisements. More... | |
void | msearchreply_state_machine_stop (struct advertisement_state_machine *a) |
Stop M-SEARCH reply state machine. More... | |
void | ssdp_listener_stop (struct upnp_wps_device_sm *sm) |
Stop SSDP listered. More... | |
int | ssdp_listener_open (void) |
int | ssdp_listener_start (struct upnp_wps_device_sm *sm) |
Set up for receiving discovery (UDP) packets. More... | |
int | add_ssdp_network (const char *net_if) |
Add routing entry for SSDP. More... | |
int | ssdp_open_multicast_sock (u32 ip_addr, const char *forced_ifname) |
int | ssdp_open_multicast (struct upnp_wps_device_sm *sm) |
Open socket for sending multicast SSDP messages. More... | |
UPnP SSDP for WPS Copyright (c) 2006-2007 Sony Corporation Copyright (c) 2008-2009 Atheros Communications Copyright (c) 2009-2013, Jouni Malinen j@w1. fi
See wps_upnp.c for more details on licensing and code history.
int add_ssdp_network | ( | const char * | net_if | ) |
Add routing entry for SSDP.
net_if | Selected network interface name |
This function assures that the multicast address will be properly handled by Linux networking code (by a modification to routing tables). This must be done per network interface. It really only needs to be done once after booting up, but it does not hurt to call this more frequently "to be safe".
int advertisement_state_machine_start | ( | struct upnp_wps_device_sm * | sm | ) |
Start SSDP advertisements.
sm | WPS UPnP state machine from upnp_wps_device_init() |
void advertisement_state_machine_stop | ( | struct upnp_wps_device_sm * | sm, |
int | send_byebye | ||
) |
Stop SSDP advertisements.
sm | WPS UPnP state machine from upnp_wps_device_init() |
send_byebye | Send byebye advertisement messages immediately |
void msearchreply_state_machine_stop | ( | struct advertisement_state_machine * | a | ) |
Stop M-SEARCH reply state machine.
a | Selected advertisement/reply state |
int ssdp_listener_start | ( | struct upnp_wps_device_sm * | sm | ) |
Set up for receiving discovery (UDP) packets.
sm | WPS UPnP state machine from upnp_wps_device_init() |
The SSDP listener is stopped by calling ssdp_listener_stop().
void ssdp_listener_stop | ( | struct upnp_wps_device_sm * | sm | ) |
Stop SSDP listered.
sm | WPS UPnP state machine from upnp_wps_device_init() |
This function stops the SSDP listener that was started by calling ssdp_listener_start().
int ssdp_open_multicast | ( | struct upnp_wps_device_sm * | sm | ) |
Open socket for sending multicast SSDP messages.
sm | WPS UPnP state machine from upnp_wps_device_init() |