nbns_client.h File Reference

NBNS client (NetBIOS Name Service) More...

#include "core/net.h"
#include "core/socket.h"
#include "core/udp.h"
#include "dns/dns_cache.h"
#include "dns/dns_common.h"
#include "netbios/nbns_common.h"

Go to the source code of this file.

Macros

#define NBNS_CLIENT_SUPPORT   ENABLED
 
#define NBNS_CLIENT_MAX_RETRIES   3
 
#define NBNS_CLIENT_INIT_TIMEOUT   1000
 
#define NBNS_CLIENT_MAX_TIMEOUT   1000
 
#define NBNS_MAX_LIFETIME   60000
 

Functions

error_t nbnsResolve (NetInterface *interface, const char_t *name, IpAddr *ipAddr)
 Resolve a host name using NBNS. More...
 
error_t nbnsSendQuery (DnsCacheEntry *entry)
 Send a NBNS query message. More...
 
void nbnsProcessResponse (NetInterface *interface, const Ipv4PseudoHeader *pseudoHeader, const UdpHeader *udpHeader, const NbnsHeader *message, size_t length)
 Process NBNS response message. More...
 

Detailed Description

NBNS client (NetBIOS Name Service)

License

Copyright (C) 2010-2018 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.0

Definition in file nbns_client.h.

Macro Definition Documentation

◆ NBNS_CLIENT_INIT_TIMEOUT

#define NBNS_CLIENT_INIT_TIMEOUT   1000

Definition at line 56 of file nbns_client.h.

◆ NBNS_CLIENT_MAX_RETRIES

#define NBNS_CLIENT_MAX_RETRIES   3

Definition at line 49 of file nbns_client.h.

◆ NBNS_CLIENT_MAX_TIMEOUT

#define NBNS_CLIENT_MAX_TIMEOUT   1000

Definition at line 63 of file nbns_client.h.

◆ NBNS_CLIENT_SUPPORT

#define NBNS_CLIENT_SUPPORT   ENABLED

Definition at line 42 of file nbns_client.h.

◆ NBNS_MAX_LIFETIME

#define NBNS_MAX_LIFETIME   60000

Definition at line 70 of file nbns_client.h.

Function Documentation

◆ nbnsProcessResponse()

void nbnsProcessResponse ( NetInterface interface,
const Ipv4PseudoHeader pseudoHeader,
const UdpHeader udpHeader,
const NbnsHeader message,
size_t  length 
)

Process NBNS response message.

Parameters
[in]interfaceUnderlying network interface
[in]pseudoHeaderUDP pseudo header
[in]udpHeaderUDP header
[in]messagePointer to the NBNS response message
[in]lengthLength of the message

Definition at line 274 of file nbns_client.c.

◆ nbnsResolve()

error_t nbnsResolve ( NetInterface interface,
const char_t name,
IpAddr ipAddr 
)

Resolve a host name using NBNS.

Parameters
[in]interfaceUnderlying network interface
[in]nameName of the host to be resolved
[out]ipAddrIP address corresponding to the specified host name

Definition at line 50 of file nbns_client.c.

◆ nbnsSendQuery()

error_t nbnsSendQuery ( DnsCacheEntry entry)

Send a NBNS query message.

Parameters
[in]entryPointer to a valid DNS cache entry
Returns
Error code

Definition at line 190 of file nbns_client.c.