mirror of
https://github.com/pvvx/RTL00MP3.git
synced 2025-07-31 12:41:06 +00:00
update
This commit is contained in:
parent
52c964be3f
commit
a590693719
37 changed files with 1008 additions and 841 deletions
|
@ -163,12 +163,13 @@ PACK_STRUCT_END
|
|||
# include "arch/epstruct.h"
|
||||
#endif
|
||||
|
||||
//#define toupper(CH) \
|
||||
// (((CH) >= 'a' && (CH) <= 'z') ? ((CH) - 'a' + 'A') : (CH))
|
||||
LOCAL char toupper(char ch) {
|
||||
return ((ch >= 'a' && ch <= 'z') ? ch - 'a' + 'A' : ch);
|
||||
}
|
||||
|
||||
|
||||
/** NetBIOS decoding name */
|
||||
static int8_t NETBIOS_CODE_ATTR NBNS_decode(char *dst, char *src)
|
||||
LOCAL int8_t NETBIOS_CODE_ATTR NBNS_decode(char *dst, char *src)
|
||||
{
|
||||
uint8_t i, j;
|
||||
char c;
|
||||
|
@ -217,7 +218,7 @@ static void NBNS_encode(char *dst, char *src, uint8_t type)
|
|||
#endif
|
||||
|
||||
/** NetBIOS Name service recv callback */
|
||||
static void NETBIOS_CODE_ATTR
|
||||
LOCAL void NETBIOS_CODE_ATTR
|
||||
netbios_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, ip_addr_t *addr,
|
||||
u16_t port) {
|
||||
LWIP_UNUSED_ARG(arg);
|
||||
|
@ -226,7 +227,7 @@ netbios_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, ip_addr_t *addr,
|
|||
if (current_netif != NULL && current_netif->num < NET_IF_NUM) {
|
||||
uint32 ip = current_netif->ip_addr.addr;
|
||||
char *curbiosname = netbios_name[current_netif->num];
|
||||
if (curbiosname[0] != '\0' && ip != NULL
|
||||
if (curbiosname[0] != '\0' && ip != 0
|
||||
/* we only answer if we got a default interface */
|
||||
&& (((ip ^ addr->addr) & current_netif->netmask.addr) == 0)) { // запрет ответа другой подсети
|
||||
#if DEBUGSOO > 3
|
||||
|
@ -308,7 +309,7 @@ netbios_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, ip_addr_t *addr,
|
|||
}
|
||||
}
|
||||
|
||||
struct udp_pcb * NETBIOS_CODE_ATTR netbios_pcb(void) {
|
||||
LOCAL struct udp_pcb * NETBIOS_CODE_ATTR netbios_pcb(void) {
|
||||
struct udp_pcb *pcb;
|
||||
for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) {
|
||||
if (pcb->local_port == NETBIOS_PORT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue