Smart Home firewall
Profile-based Smart Home firewall
Functions
ssdp.c File Reference

SSDP message parser. More...

#include "ssdp.h"
Include dependency graph for ssdp.c:

Functions

ssdp_message_t ssdp_parse_message (uint8_t *data, uint32_t dst_addr)
 Parse the method and URI of SSDP message. More...
 
char * ssdp_method_to_str (ssdp_method_t method)
 Converts a SSDP method from enum value to character string. More...
 
void ssdp_print_message (ssdp_message_t message)
 Print the method and URI of a SSDP message. More...
 

Detailed Description

SSDP message parser.

Date
2022-11-24

Function Documentation

◆ ssdp_method_to_str()

char* ssdp_method_to_str ( ssdp_method_t  method)

Converts a SSDP method from enum value to character string.

Parameters
methodthe SSDP method in enum value
Returns
the same SSDP method as a character string

◆ ssdp_parse_message()

ssdp_message_t ssdp_parse_message ( uint8_t *  data,
uint32_t  dst_addr 
)

Parse the method and URI of SSDP message.

Parameters
datapointer to the start of the SSDP message
dst_addrIPv4 destination address, in network byte order
Returns
the parsed SSDP message

◆ ssdp_print_message()

void ssdp_print_message ( ssdp_message_t  message)

Print the method and URI of a SSDP message.

Parameters
messagethe message to print