Go to the documentation of this file.
31 #ifndef _NBNS_COMMON_H
32 #define _NBNS_COMMON_H
39 #ifndef NBNS_DEFAULT_RESOURCE_RECORD_TTL
40 #define NBNS_DEFAULT_RESOURCE_RECORD_TTL 120
41 #elif (NBNS_DEFAULT_RESOURCE_RECORD_TTL < 1)
42 #error NBNS_DEFAULT_RESOURCE_RECORD_TTL parameter is not valid
49 #define NBNS_ENCODE_H(c) ('A' + (((c) >> 4) & 0x0F))
50 #define NBNS_ENCODE_L(c) ('A' + ((c) & 0x0F))
93 #elif defined(__CWCC__) || defined(_WIN32)
105 #if defined(_CPU_BIG_ENDIAN) && !defined(__ICCRX__)
197 #if defined(__CCRX__)
199 #elif defined(__CWCC__) || defined(_WIN32)
bool_t nbnsCompareName(const NbnsHeader *message, size_t length, size_t pos, const char_t *name)
Compare NetBIOS names.
NbnsNameFlags
NBNS name flags.
uint16_t numberSendAborts
error_t nbnsInit(NetInterface *interface)
NBNS related initialization.
Structure describing a buffer that spans multiple chunks.
@ NBNS_FLAG_G
Group name flag.
uint16_t maxNumberPendingSessions
@ NBNS_FLAG_ONT_PNODE
Owner node type (P node)
uint32_t Ipv4Addr
IPv4 network address.
@ NBNS_NAME_FLAG_PRM
Permanent name flag.
size_t nbnsParseName(const NbnsHeader *message, size_t length, size_t pos, char_t *dest)
Decode a NetBIOS name.
uint16_t totalNumberCommandBlocks
@ NBNS_FLAG_ONT_BNODE
Owner node type (B node)
uint16_t sessionDataPacketSize
@ NBNS_FLAG_ONT
Owner node type.
uint16_t numberNoResourceConditions
@ NBNS_NAME_FLAG_ACT
Active name flag.
@ NBNS_FLAG_ONT_MNODE
Owner node type (M node)
uint16_t numberAlignmentErrors
@ NBNS_NAME_FLAG_DRG
Deregister flag.
uint16_t numberPendingSessions
@ NBNS_NAME_FLAG_CNF
Conflict flag.
uint16_t maxTotalNumberCommandBlocks
uint16_t numberFreeCommandBlocks
uint16_t numberOfCollisions
void nbnsProcessMessage(NetInterface *interface, const IpPseudoHeader *pseudoHeader, const UdpHeader *udpHeader, const NetBuffer *buffer, size_t offset, const NetRxAncillary *ancillary, void *param)
Process incoming NBNS message.
uint16_t periodOfStatistics
uint16_t numberRetransmits
NbnsNodeNameEntry names[]
uint32_t numberGoodReceives
@ NBNS_NAME_FLAG_ONT_BNODE
Owner node type (B node)
@ NBNS_NAME_FLAG_G
Group name flag.
size_t nbnsEncodeName(const char_t *src, uint8_t *dest)
Encode a NetBIOS name.
uint16_t maxTotalSessionsPossible
@ NBNS_NAME_FLAG_ONT
Owner node type.
typedef __packed_struct
NBNS message header.
@ NBNS_NAME_FLAG_ONT_PNODE
Owner node type (P node)
@ NBNS_NAME_FLAG_ONT_MNODE
Owner node type (M node)