LLMNR responder (Link-Local Multicast Name Resolution) More...
#include "core/net.h"
#include "ipv4/ipv4_multicast.h"
#include "ipv6/ipv6_multicast.h"
#include "llmnr/llmnr_responder.h"
#include "dns/dns_debug.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL LLMNR_TRACE_LEVEL |
Functions | |
error_t | llmnrResponderInit (NetInterface *interface) |
LLMNR responder initialization. More... | |
void | llmnrProcessQuery (NetInterface *interface, const IpPseudoHeader *pseudoHeader, const UdpHeader *udpHeader, const NetBuffer *buffer, size_t offset, const NetRxAncillary *ancillary, void *param) |
Process LLMNR query message. More... | |
error_t | llmnrSendResponse (NetInterface *interface, const IpAddr *destIpAddr, uint16_t destPort, uint16_t id, uint16_t qtype, uint16_t qclass) |
Send LLMNR response message. More... | |
error_t | llmnrFormatIpv4AddrRecord (NetInterface *interface, LlmnrHeader *message, size_t *length, Ipv4Addr ipv4Addr) |
Format A resource record. More... | |
error_t | llmnrFormatIpv6AddrRecord (NetInterface *interface, LlmnrHeader *message, size_t *length, const Ipv6Addr *ipv6Addr) |
Format AAAA resource record. More... | |
Detailed Description
LLMNR responder (Link-Local Multicast Name Resolution)
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 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.
- Version
- 2.4.4
Definition in file llmnr_responder.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL LLMNR_TRACE_LEVEL |
Definition at line 32 of file llmnr_responder.c.
Function Documentation
◆ llmnrFormatIpv4AddrRecord()
error_t llmnrFormatIpv4AddrRecord | ( | NetInterface * | interface, |
LlmnrHeader * | message, | ||
size_t * | length, | ||
Ipv4Addr | ipv4Addr | ||
) |
Format A resource record.
- Parameters
-
[in] interface Underlying network interface [in] message Pointer to the LLMNR message [in,out] length Actual length of the LLMNR message, in bytes [in] ipv4Addr IPv4 address to be added
- Returns
- Error code
Definition at line 415 of file llmnr_responder.c.
◆ llmnrFormatIpv6AddrRecord()
error_t llmnrFormatIpv6AddrRecord | ( | NetInterface * | interface, |
LlmnrHeader * | message, | ||
size_t * | length, | ||
const Ipv6Addr * | ipv6Addr | ||
) |
Format AAAA resource record.
- Parameters
-
[in] interface Underlying network interface [in] message Pointer to the LLMNR message [in,out] length Actual length of the LLMNR message, in bytes [in] ipv6Addr IPv6 address to be added
- Returns
- Error code
Definition at line 475 of file llmnr_responder.c.
◆ llmnrProcessQuery()
void llmnrProcessQuery | ( | NetInterface * | interface, |
const IpPseudoHeader * | pseudoHeader, | ||
const UdpHeader * | udpHeader, | ||
const NetBuffer * | buffer, | ||
size_t | offset, | ||
const NetRxAncillary * | ancillary, | ||
void * | param | ||
) |
Process LLMNR query message.
- Parameters
-
[in] interface Underlying network interface [in] pseudoHeader UDP pseudo header [in] udpHeader UDP header [in] buffer Multi-part buffer containing the incoming LLMNR message [in] offset Offset to the first byte of the LLMNR message [in] ancillary Additional options passed to the stack along with the packet [in] param Callback function parameter (not used)
Definition at line 96 of file llmnr_responder.c.
◆ llmnrResponderInit()
error_t llmnrResponderInit | ( | NetInterface * | interface | ) |
LLMNR responder initialization.
- Parameters
-
[in] interface Underlying network interface
- Returns
- Error code
Definition at line 52 of file llmnr_responder.c.
◆ llmnrSendResponse()
error_t llmnrSendResponse | ( | NetInterface * | interface, |
const IpAddr * | destIpAddr, | ||
uint16_t | destPort, | ||
uint16_t | id, | ||
uint16_t | qtype, | ||
uint16_t | qclass | ||
) |
Send LLMNR response message.
- Parameters
-
[in] interface Underlying network interface [in] destIpAddr Destination IP address [in] destPort destination port [in] id 16-bit identifier to be used when sending LLMNR query [in] qtype Resource record type [in] qclass Resource record class
Definition at line 236 of file llmnr_responder.c.