mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-29 18:27:31 +02:00
CI: fixing the files to be complient with pre-commit hooks
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#ifndef ESP_MDNS_NETWORKING_H_
|
||||
#define ESP_MDNS_NETWORKING_H_
|
||||
|
||||
@ -12,7 +17,7 @@
|
||||
/**
|
||||
* @brief Queue RX packet action
|
||||
*/
|
||||
esp_err_t _mdns_send_rx_action(mdns_rx_packet_t * packet);
|
||||
esp_err_t _mdns_send_rx_action(mdns_rx_packet_t *packet);
|
||||
|
||||
/**
|
||||
* @brief Start PCB
|
||||
@ -33,12 +38,12 @@ esp_err_t _mdns_pcb_deinit(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol);
|
||||
*
|
||||
* @return length of sent packet or 0 on error
|
||||
*/
|
||||
size_t _mdns_udp_pcb_write(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol, const esp_ip_addr_t *ip, uint16_t port, uint8_t * data, size_t len);
|
||||
size_t _mdns_udp_pcb_write(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol, const esp_ip_addr_t *ip, uint16_t port, uint8_t *data, size_t len);
|
||||
|
||||
/**
|
||||
* @brief Gets data pointer to the mDNS packet
|
||||
*/
|
||||
void* _mdns_get_packet_data(mdns_rx_packet_t *packet);
|
||||
void *_mdns_get_packet_data(mdns_rx_packet_t *packet);
|
||||
|
||||
/**
|
||||
* @brief Gets data length of c
|
||||
|
@ -231,27 +231,27 @@ typedef struct {
|
||||
} mdns_name_t;
|
||||
|
||||
typedef struct mdns_parsed_question_s {
|
||||
struct mdns_parsed_question_s * next;
|
||||
struct mdns_parsed_question_s *next;
|
||||
uint16_t type;
|
||||
bool sub;
|
||||
bool unicast;
|
||||
char * host;
|
||||
char * service;
|
||||
char * proto;
|
||||
char * domain;
|
||||
char *host;
|
||||
char *service;
|
||||
char *proto;
|
||||
char *domain;
|
||||
} mdns_parsed_question_t;
|
||||
|
||||
typedef struct mdns_parsed_record_s {
|
||||
struct mdns_parsed_record_s * next;
|
||||
struct mdns_parsed_record_s *next;
|
||||
mdns_parsed_record_type_t record_type;
|
||||
uint16_t type;
|
||||
uint16_t clas;
|
||||
uint8_t flush;
|
||||
uint32_t ttl;
|
||||
char * host;
|
||||
char * service;
|
||||
char * proto;
|
||||
char * domain;
|
||||
char *host;
|
||||
char *service;
|
||||
char *proto;
|
||||
char *domain;
|
||||
uint16_t data_len;
|
||||
uint8_t *data;
|
||||
} mdns_parsed_record_t;
|
||||
@ -266,8 +266,8 @@ typedef struct {
|
||||
uint8_t probe;
|
||||
uint8_t discovery;
|
||||
uint8_t distributed;
|
||||
mdns_parsed_question_t * questions;
|
||||
mdns_parsed_record_t * records;
|
||||
mdns_parsed_question_t *questions;
|
||||
mdns_parsed_record_t *records;
|
||||
uint16_t id;
|
||||
} mdns_parsed_packet_t;
|
||||
|
||||
@ -282,65 +282,65 @@ typedef struct {
|
||||
} mdns_rx_packet_t;
|
||||
|
||||
typedef struct mdns_txt_linked_item_s {
|
||||
const char * key; /*!< item key name */
|
||||
char * value; /*!< item value string */
|
||||
const char *key; /*!< item key name */
|
||||
char *value; /*!< item value string */
|
||||
uint8_t value_len; /*!< item value length */
|
||||
struct mdns_txt_linked_item_s * next; /*!< next result, or NULL for the last result in the list */
|
||||
struct mdns_txt_linked_item_s *next; /*!< next result, or NULL for the last result in the list */
|
||||
} mdns_txt_linked_item_t;
|
||||
|
||||
typedef struct mdns_subtype_s {
|
||||
const char *subtype; /*!< subtype */
|
||||
struct mdns_subtype_s * next; /*!< next result, or NULL for the last result in the list */
|
||||
struct mdns_subtype_s *next; /*!< next result, or NULL for the last result in the list */
|
||||
} mdns_subtype_t;
|
||||
|
||||
typedef struct {
|
||||
const char * instance;
|
||||
const char * service;
|
||||
const char * proto;
|
||||
const char * hostname;
|
||||
const char *instance;
|
||||
const char *service;
|
||||
const char *proto;
|
||||
const char *hostname;
|
||||
uint16_t priority;
|
||||
uint16_t weight;
|
||||
uint16_t port;
|
||||
mdns_txt_linked_item_t * txt;
|
||||
mdns_txt_linked_item_t *txt;
|
||||
mdns_subtype_t *subtype;
|
||||
} mdns_service_t;
|
||||
|
||||
typedef struct mdns_srv_item_s {
|
||||
struct mdns_srv_item_s * next;
|
||||
mdns_service_t * service;
|
||||
struct mdns_srv_item_s *next;
|
||||
mdns_service_t *service;
|
||||
} mdns_srv_item_t;
|
||||
|
||||
typedef struct mdns_out_question_s {
|
||||
struct mdns_out_question_s * next;
|
||||
struct mdns_out_question_s *next;
|
||||
uint16_t type;
|
||||
bool unicast;
|
||||
const char * host;
|
||||
const char * service;
|
||||
const char * proto;
|
||||
const char * domain;
|
||||
const char *host;
|
||||
const char *service;
|
||||
const char *proto;
|
||||
const char *domain;
|
||||
bool own_dynamic_memory;
|
||||
} mdns_out_question_t;
|
||||
|
||||
typedef struct mdns_host_item_t {
|
||||
const char * hostname;
|
||||
const char *hostname;
|
||||
mdns_ip_addr_t *address_list;
|
||||
struct mdns_host_item_t *next;
|
||||
} mdns_host_item_t;
|
||||
|
||||
typedef struct mdns_out_answer_s {
|
||||
struct mdns_out_answer_s * next;
|
||||
struct mdns_out_answer_s *next;
|
||||
uint16_t type;
|
||||
uint8_t bye;
|
||||
uint8_t flush;
|
||||
mdns_service_t * service;
|
||||
mdns_host_item_t* host;
|
||||
const char * custom_instance;
|
||||
const char * custom_service;
|
||||
const char * custom_proto;
|
||||
mdns_service_t *service;
|
||||
mdns_host_item_t *host;
|
||||
const char *custom_instance;
|
||||
const char *custom_service;
|
||||
const char *custom_proto;
|
||||
} mdns_out_answer_t;
|
||||
|
||||
typedef struct mdns_tx_packet_s {
|
||||
struct mdns_tx_packet_s * next;
|
||||
struct mdns_tx_packet_s *next;
|
||||
uint32_t send_at;
|
||||
mdns_if_t tcpip_if;
|
||||
mdns_ip_protocol_t ip_protocol;
|
||||
@ -348,18 +348,18 @@ typedef struct mdns_tx_packet_s {
|
||||
uint16_t port;
|
||||
uint16_t flags;
|
||||
uint8_t distributed;
|
||||
mdns_out_question_t * questions;
|
||||
mdns_out_answer_t * answers;
|
||||
mdns_out_answer_t * servers;
|
||||
mdns_out_answer_t * additional;
|
||||
mdns_out_question_t *questions;
|
||||
mdns_out_answer_t *answers;
|
||||
mdns_out_answer_t *servers;
|
||||
mdns_out_answer_t *additional;
|
||||
bool queued;
|
||||
uint16_t id;
|
||||
} mdns_tx_packet_t;
|
||||
|
||||
typedef struct {
|
||||
mdns_pcb_state_t state;
|
||||
struct udp_pcb * pcb;
|
||||
mdns_srv_item_t ** probe_services;
|
||||
struct udp_pcb *pcb;
|
||||
mdns_srv_item_t **probe_services;
|
||||
uint8_t probe_services_len;
|
||||
uint8_t probe_ip;
|
||||
uint8_t probe_running;
|
||||
@ -374,7 +374,7 @@ typedef enum {
|
||||
} mdns_search_once_state_t;
|
||||
|
||||
typedef struct mdns_search_once_s {
|
||||
struct mdns_search_once_s * next;
|
||||
struct mdns_search_once_s *next;
|
||||
|
||||
mdns_search_once_state_t state;
|
||||
uint32_t started_at;
|
||||
@ -386,23 +386,23 @@ typedef struct mdns_search_once_s {
|
||||
bool unicast;
|
||||
uint8_t max_results;
|
||||
uint8_t num_results;
|
||||
char * instance;
|
||||
char * service;
|
||||
char * proto;
|
||||
mdns_result_t * result;
|
||||
char *instance;
|
||||
char *service;
|
||||
char *proto;
|
||||
mdns_result_t *result;
|
||||
} mdns_search_once_t;
|
||||
|
||||
typedef struct mdns_server_s {
|
||||
struct {
|
||||
mdns_pcb_t pcbs[MDNS_IP_PROTOCOL_MAX];
|
||||
} interfaces[MDNS_MAX_INTERFACES];
|
||||
const char * hostname;
|
||||
const char * instance;
|
||||
mdns_srv_item_t * services;
|
||||
const char *hostname;
|
||||
const char *instance;
|
||||
mdns_srv_item_t *services;
|
||||
SemaphoreHandle_t lock;
|
||||
QueueHandle_t action_queue;
|
||||
mdns_tx_packet_t * tx_queue_head;
|
||||
mdns_search_once_t * search_once;
|
||||
mdns_tx_packet_t *tx_queue_head;
|
||||
mdns_search_once_t *search_once;
|
||||
esp_timer_handle_t timer_handle;
|
||||
} mdns_server_t;
|
||||
|
||||
@ -410,57 +410,57 @@ typedef struct {
|
||||
mdns_action_type_t type;
|
||||
union {
|
||||
struct {
|
||||
char * hostname;
|
||||
char *hostname;
|
||||
TaskHandle_t calling_task;
|
||||
} hostname_set;
|
||||
char * instance;
|
||||
char *instance;
|
||||
struct {
|
||||
mdns_if_t interface;
|
||||
mdns_event_actions_t event_action;
|
||||
} sys_event;
|
||||
struct {
|
||||
mdns_srv_item_t * service;
|
||||
mdns_srv_item_t *service;
|
||||
} srv_add;
|
||||
struct {
|
||||
mdns_srv_item_t * service;
|
||||
mdns_srv_item_t *service;
|
||||
} srv_del;
|
||||
struct {
|
||||
mdns_srv_item_t * service;
|
||||
char * instance;
|
||||
mdns_srv_item_t *service;
|
||||
char *instance;
|
||||
} srv_instance;
|
||||
struct {
|
||||
mdns_srv_item_t * service;
|
||||
mdns_srv_item_t *service;
|
||||
uint16_t port;
|
||||
} srv_port;
|
||||
struct {
|
||||
mdns_srv_item_t * service;
|
||||
mdns_txt_linked_item_t * txt;
|
||||
mdns_srv_item_t *service;
|
||||
mdns_txt_linked_item_t *txt;
|
||||
} srv_txt_replace;
|
||||
struct {
|
||||
mdns_srv_item_t * service;
|
||||
char * key;
|
||||
char * value;
|
||||
mdns_srv_item_t *service;
|
||||
char *key;
|
||||
char *value;
|
||||
uint8_t value_len;
|
||||
} srv_txt_set;
|
||||
struct {
|
||||
mdns_srv_item_t * service;
|
||||
char * key;
|
||||
mdns_srv_item_t *service;
|
||||
char *key;
|
||||
} srv_txt_del;
|
||||
struct {
|
||||
mdns_srv_item_t * service;
|
||||
char * subtype;
|
||||
mdns_srv_item_t *service;
|
||||
char *subtype;
|
||||
} srv_subtype_add;
|
||||
struct {
|
||||
mdns_search_once_t * search;
|
||||
mdns_search_once_t *search;
|
||||
} search_add;
|
||||
struct {
|
||||
mdns_tx_packet_t * packet;
|
||||
mdns_tx_packet_t *packet;
|
||||
} tx_handle;
|
||||
struct {
|
||||
mdns_rx_packet_t * packet;
|
||||
mdns_rx_packet_t *packet;
|
||||
} rx_handle;
|
||||
struct {
|
||||
const char * hostname;
|
||||
const char *hostname;
|
||||
mdns_ip_addr_t *address_list;
|
||||
} delegate_hostname;
|
||||
} data;
|
||||
|
Reference in New Issue
Block a user