@@ -249,7 +249,7 @@ struct dnsquery_resourcerecord
249
249
};
250
250
251
251
252
- void netbuf_add_32bitnum (unsigned char * buf , int buflen , int * offset , unsigned int num )
252
+ static void netbuf_add_32bitnum (unsigned char * buf , int buflen , int * offset , unsigned int num )
253
253
{
254
254
unsigned char * start = buf + * offset ;
255
255
unsigned char * p = start ;
@@ -263,7 +263,7 @@ void netbuf_add_32bitnum(unsigned char *buf, int buflen, int *offset, unsigned i
263
263
* offset += 4 ;
264
264
}
265
265
266
- void netbuf_get_32bitnum (unsigned char * buf , int buflen , int * offset , unsigned int * num )
266
+ static void netbuf_get_32bitnum (unsigned char * buf , int buflen , int * offset , unsigned int * num )
267
267
{
268
268
unsigned char * start = buf + * offset ;
269
269
unsigned char * p = start ;
@@ -278,7 +278,7 @@ void netbuf_get_32bitnum(unsigned char *buf, int buflen, int *offset, unsigned i
278
278
* offset += 4 ;
279
279
}
280
280
281
- void netbuf_add_16bitnum (unsigned char * buf , int buflen , int * offset , unsigned short num )
281
+ static void netbuf_add_16bitnum (unsigned char * buf , int buflen , int * offset , unsigned short num )
282
282
{
283
283
unsigned char * start = buf + * offset ;
284
284
unsigned char * p = start ;
@@ -290,7 +290,7 @@ void netbuf_add_16bitnum(unsigned char *buf, int buflen, int *offset, unsigned s
290
290
* offset += 2 ;
291
291
}
292
292
293
- void netbuf_get_16bitnum (unsigned char * buf , int buflen , int * offset , unsigned short * num )
293
+ static void netbuf_get_16bitnum (unsigned char * buf , int buflen , int * offset , unsigned short * num )
294
294
{
295
295
unsigned char * start = buf + * offset ;
296
296
unsigned char * p = start ;
@@ -303,7 +303,7 @@ void netbuf_get_16bitnum(unsigned char *buf, int buflen, int *offset, unsigned s
303
303
* offset += 2 ;
304
304
}
305
305
306
- void netbuf_add_domain_name (unsigned char * buf , int buflen , int * offset ,
306
+ static void netbuf_add_domain_name (unsigned char * buf , int buflen , int * offset ,
307
307
char * name )
308
308
{
309
309
unsigned char * start = buf + * offset ;
@@ -346,7 +346,7 @@ void netbuf_add_domain_name(unsigned char *buf, int buflen, int *offset,
346
346
* offset += p - start ;
347
347
}
348
348
349
- int calc_domain_name_size (unsigned char * buf , int buflen , int offset )
349
+ static int calc_domain_name_size (unsigned char * buf , int buflen , int offset )
350
350
{
351
351
unsigned char * p = buf + offset ;
352
352
int len = 0 ;
@@ -375,7 +375,7 @@ int calc_domain_name_size(unsigned char *buf, int buflen, int offset)
375
375
return len ;
376
376
}
377
377
378
- int netbuf_get_domain_name (unsigned char * buf , int buflen , int * offset , char * namebuf , int namebuflen )
378
+ static int netbuf_get_domain_name (unsigned char * buf , int buflen , int * offset , char * namebuf , int namebuflen )
379
379
{
380
380
unsigned char * start = buf + * offset ;
381
381
unsigned char * p , * p2 ;
@@ -457,7 +457,7 @@ int netbuf_get_domain_name(unsigned char *buf, int buflen, int *offset, char *na
457
457
return 0 ;
458
458
}
459
459
460
- void netbuf_add_dnsquery_header (unsigned char * buf , int buflen , int * offset , struct dnsquery_header * header )
460
+ static void netbuf_add_dnsquery_header (unsigned char * buf , int buflen , int * offset , struct dnsquery_header * header )
461
461
{
462
462
unsigned char * p ;
463
463
@@ -480,7 +480,7 @@ void netbuf_add_dnsquery_header(unsigned char *buf, int buflen, int *offset, str
480
480
netbuf_add_16bitnum (buf , buflen , offset , header -> arcount );
481
481
}
482
482
483
- void netbuf_get_dnsquery_header (unsigned char * buf , int buflen , int * offset , struct dnsquery_header * header )
483
+ static void netbuf_get_dnsquery_header (unsigned char * buf , int buflen , int * offset , struct dnsquery_header * header )
484
484
{
485
485
unsigned char * p ;
486
486
@@ -505,29 +505,29 @@ void netbuf_get_dnsquery_header(unsigned char *buf, int buflen, int *offset, str
505
505
netbuf_get_16bitnum (buf , buflen , offset , & (header -> arcount ));
506
506
}
507
507
508
- void netbuf_add_dnsquery_question (unsigned char * buf , int buflen , int * offset , struct dnsquery_question * question )
508
+ static void netbuf_add_dnsquery_question (unsigned char * buf , int buflen , int * offset , struct dnsquery_question * question )
509
509
{
510
510
netbuf_add_domain_name (buf , buflen , offset , question -> qname );
511
511
netbuf_add_16bitnum (buf , buflen , offset , question -> qtype );
512
512
netbuf_add_16bitnum (buf , buflen , offset , question -> qclass );
513
513
}
514
514
515
- void netbuf_get_dnsquery_question (unsigned char * buf , int buflen , int * offset , struct dnsquery_question * question )
515
+ static void netbuf_get_dnsquery_question (unsigned char * buf , int buflen , int * offset , struct dnsquery_question * question )
516
516
{
517
517
netbuf_get_domain_name (buf , buflen , offset , question -> qname , 1024 );
518
518
netbuf_get_16bitnum (buf , buflen , offset , & (question -> qtype ));
519
519
netbuf_get_16bitnum (buf , buflen , offset , & (question -> qclass ));
520
520
}
521
521
522
- void netbuf_get_dnsquery_srvrdata (unsigned char * buf , int buflen , int * offset , struct dnsquery_srvrdata * srvrdata )
522
+ static void netbuf_get_dnsquery_srvrdata (unsigned char * buf , int buflen , int * offset , struct dnsquery_srvrdata * srvrdata )
523
523
{
524
524
netbuf_get_16bitnum (buf , buflen , offset , & (srvrdata -> priority ));
525
525
netbuf_get_16bitnum (buf , buflen , offset , & (srvrdata -> weight ));
526
526
netbuf_get_16bitnum (buf , buflen , offset , & (srvrdata -> port ));
527
527
netbuf_get_domain_name (buf , buflen , offset , srvrdata -> target , 1024 );
528
528
}
529
529
530
- void netbuf_get_dnsquery_resourcerecord (unsigned char * buf , int buflen , int * offset , struct dnsquery_resourcerecord * rr )
530
+ static void netbuf_get_dnsquery_resourcerecord (unsigned char * buf , int buflen , int * offset , struct dnsquery_resourcerecord * rr )
531
531
{
532
532
netbuf_get_domain_name (buf , buflen , offset , rr -> name , 1024 );
533
533
netbuf_get_16bitnum (buf , buflen , offset , & (rr -> type ));
0 commit comments