llmnr_common.h File Reference

Definitions common to LLMNR client and responder. More...

#include "core/net.h"
#include "dns/dns_common.h"

Go to the source code of this file.

Macros

#define LLMNR_DEFAULT_RESOURCE_RECORD_TTL   30
 
#define LLMNR_PORT   5355
 
#define LLMNR_DEFAULT_IP_TTL   255
 
#define LLMNR_IPV4_MULTICAST_ADDR   IPV4_ADDR(224, 0, 0, 252)
 

Typedefs

struct {
   uint16_t   id
 
   uint8_t   t: 1
 
   uint8_t   tc: 1
 
   uint8_t   c: 1
 
   uint8_t   opcode: 4
 
   uint8_t   qr: 1
 
   uint8_t   rcode: 4
 
   uint8_t   z: 4
 
   uint16_t   qdcount
 
   uint16_t   ancount
 
   uint16_t   nscount
 
   uint16_t   arcount
 
   uint8_t   questions []
 
LlmnrHeader
 LLMNR message header. More...
 

Functions

error_t llmnrInit (NetInterface *interface)
 LLMNR related initialization. More...
 
void llmnrProcessMessage (NetInterface *interface, const IpPseudoHeader *pseudoHeader, const UdpHeader *udpHeader, const NetBuffer *buffer, size_t offset, void *param)
 Process incoming LLMNR message. More...
 

Variables

const Ipv6Addr LLMNR_IPV6_MULTICAST_ADDR
 

Detailed Description

Definitions common to LLMNR client and responder.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2019 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
1.9.2

Definition in file llmnr_common.h.

Macro Definition Documentation

◆ LLMNR_DEFAULT_IP_TTL

#define LLMNR_DEFAULT_IP_TTL   255

Definition at line 48 of file llmnr_common.h.

◆ LLMNR_DEFAULT_RESOURCE_RECORD_TTL

#define LLMNR_DEFAULT_RESOURCE_RECORD_TTL   30

Definition at line 40 of file llmnr_common.h.

◆ LLMNR_IPV4_MULTICAST_ADDR

#define LLMNR_IPV4_MULTICAST_ADDR   IPV4_ADDR(224, 0, 0, 252)

Definition at line 51 of file llmnr_common.h.

◆ LLMNR_PORT

#define LLMNR_PORT   5355

Definition at line 46 of file llmnr_common.h.

Typedef Documentation

◆ LlmnrHeader

typedef { ... } LlmnrHeader

LLMNR message header.

Function Documentation

◆ llmnrInit()

error_t llmnrInit ( NetInterface interface)

LLMNR related initialization.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 59 of file llmnr_common.c.

◆ llmnrProcessMessage()

void llmnrProcessMessage ( NetInterface interface,
const IpPseudoHeader pseudoHeader,
const UdpHeader udpHeader,
const NetBuffer buffer,
size_t  offset,
void *  param 
)

Process incoming LLMNR message.

Parameters
[in]interfaceUnderlying network interface
[in]pseudoHeaderUDP pseudo header
[in]udpHeaderUDP header
[in]bufferMulti-part buffer containing the incoming LLMNR message
[in]offsetOffset to the first byte of the LLMNR message
[in]paramCallback function parameter (not used)

Definition at line 101 of file llmnr_common.c.

Variable Documentation

◆ ancount

uint16_t ancount

Definition at line 90 of file llmnr_common.h.

◆ arcount

uint16_t arcount

Definition at line 92 of file llmnr_common.h.

◆ c

uint8_t c

Definition at line 83 of file llmnr_common.h.

◆ id

uint16_t id

Definition at line 71 of file llmnr_common.h.

◆ LLMNR_IPV6_MULTICAST_ADDR

const Ipv6Addr LLMNR_IPV6_MULTICAST_ADDR

Definition at line 49 of file llmnr_common.c.

◆ nscount

uint16_t nscount

Definition at line 91 of file llmnr_common.h.

◆ opcode

uint8_t opcode

Definition at line 84 of file llmnr_common.h.

◆ qdcount

uint16_t qdcount

Definition at line 89 of file llmnr_common.h.

◆ qr

uint8_t qr

Definition at line 85 of file llmnr_common.h.

◆ questions

uint8_t questions[]

Definition at line 93 of file llmnr_common.h.

◆ rcode

uint8_t rcode

Definition at line 86 of file llmnr_common.h.

◆ t

uint8_t t

Definition at line 81 of file llmnr_common.h.

◆ tc

uint8_t tc

Definition at line 82 of file llmnr_common.h.

◆ z

uint8_t z

Definition at line 87 of file llmnr_common.h.