@@ -257,15 +257,6 @@ name_len(netdissect_options *ndo,
257
257
return (-1 ); /* name goes past the end of the buffer */
258
258
}
259
259
260
- static void
261
- print_asc (netdissect_options * ndo ,
262
- const u_char * buf , u_int len )
263
- {
264
- u_int i ;
265
- for (i = 0 ; i < len ; i ++ )
266
- fn_print_char (ndo , GET_U_1 (buf + i ));
267
- }
268
-
269
260
static const char *
270
261
name_type_str (int name_type )
271
262
{
@@ -297,9 +288,9 @@ smb_data_print(netdissect_options *ndo, const u_char *buf, u_int len)
297
288
if (i %8 == 0 )
298
289
ND_PRINT (" " );
299
290
if (i % 16 == 0 ) {
300
- print_asc (ndo , buf + i - 16 , 8 );
291
+ nd_printjn (ndo , buf + i - 16 , 8 );
301
292
ND_PRINT (" " );
302
- print_asc (ndo , buf + i - 8 , 8 );
293
+ nd_printjn (ndo , buf + i - 8 , 8 );
303
294
ND_PRINT ("\n" );
304
295
if (i < len )
305
296
ND_PRINT ("[%03X] " , i );
@@ -316,11 +307,11 @@ smb_data_print(netdissect_options *ndo, const u_char *buf, u_int len)
316
307
ND_PRINT (" " );
317
308
318
309
n = ND_MIN (8 , i % 16 );
319
- print_asc (ndo , buf + i - (i % 16 ), n );
310
+ nd_printjn (ndo , buf + i - (i % 16 ), n );
320
311
ND_PRINT (" " );
321
312
n = (i % 16 ) - n ;
322
313
if (n > 0 )
323
- print_asc (ndo , buf + i - n , n );
314
+ nd_printjn (ndo , buf + i - n , n );
324
315
ND_PRINT ("\n" );
325
316
}
326
317
}
0 commit comments