~ubuntu-branches/ubuntu/wily/net-snmp/wily-proposed

« back to all changes in this revision

Viewing changes to man/netsnmp_util.3

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-28 14:59:36 UTC
  • mfrom: (1.2.3 upstream) (1.1.12 sid)
  • Revision ID: james.westby@ubuntu.com-20100628145936-cbiallic69pn044g
Tags: 5.4.3~dfsg-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Set Ubuntu maintainer address.
  - net-snmp-config: Use bash. (LP: #104738)
  - Removed multiuser option when calling update-rc.d. (LP: #254261)
  - debian/snmpd.init: LSBify the init script.
  - debian/patches/52_fix_snmpcmd_1_typo.patch: Adjust a typo in snmpcmd.1
    (LP: #250459)
  - debian/snmpd.postinst: source debconf before doing work, LP: #589056
  - debian/snmp.preinst, debian/snmp.prerm: kill any/all processes owned by
    snmp user before install/uninstall, LP: #573391
  - Add apport hook (LP: #533603):
  - debian/{snmp,snmpd}.apport: Added.
  - debian/control: Build-depends on dh-apport.
  - debian/rules: 
    + Add --with apport.
    + override_dh_apport to install hook on snmpd package only.
 * Dropped patches:
   - debian/patches/99-fix-ubuntu-div0.patch: Fix dvision by zero.. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH "Memory Utility Routines" 3 "5 Sep 2008" "Version 5.4.2" "net-snmp" \" -*- nroff -*-
 
1
.TH "Memory Utility Routines" 3 "23 May 2010" "Version 5.4.3.pre1" "net-snmp" \" -*- nroff -*-
2
2
.ad l
3
3
.nh
4
4
.SH NAME
7
7
 
8
8
.in +1c
9
9
.ti -1c
10
 
.RI "#define \fBSNMP_MAXPATH\fP   1024"
 
10
.RI "#define \fBSNMP_MAXPATH\fP   PATH_MAX"
11
11
.br
12
12
.ti -1c
13
13
.RI "#define \fBSNMP_MAXBUF\fP   (1024 * 4)"
90
90
.RI "#define \fBSNMP_MACRO_VAL_TO_STR_PRIV\fP(s)   #s"
91
91
.br
92
92
.ti -1c
93
 
.RI "#define \fBFALSE\fP   0"
94
 
.br
95
 
.ti -1c
96
 
.RI "#define \fBTRUE\fP   1"
97
 
.br
98
 
.ti -1c
99
93
.RI "#define \fBQUITFUN\fP(e, l)"
100
94
.br
101
95
.ti -1c
179
173
.RI "char * \fBdump_snmpEngineID\fP (const u_char *buf, size_t *buflen)"
180
174
.br
181
175
.ti -1c
182
 
.RI "\fBmarker_t\fP \fBatime_newMarker\fP (void)"
 
176
.RI "marker_t \fBatime_newMarker\fP (void)"
183
177
.br
184
178
.RI "\fIcreate a new time marker. \fP"
185
179
.ti -1c
186
 
.RI "void \fBatime_setMarker\fP (\fBmarker_t\fP pm)"
 
180
.RI "void \fBatime_setMarker\fP (marker_t pm)"
187
181
.br
188
182
.RI "\fIset a time marker. \fP"
189
183
.ti -1c
190
 
.RI "long \fBatime_diff\fP (\fBmarker_t\fP first, \fBmarker_t\fP second)"
 
184
.RI "long \fBatime_diff\fP (marker_t first, marker_t second)"
191
185
.br
192
186
.RI "\fIReturns the difference (in msec) between the two markers. \fP"
193
187
.ti -1c
194
 
.RI "u_long \fBuatime_diff\fP (\fBmarker_t\fP first, \fBmarker_t\fP second)"
 
188
.RI "u_long \fBuatime_diff\fP (marker_t first, marker_t second)"
195
189
.br
196
190
.RI "\fIReturns the difference (in u_long msec) between the two markers. \fP"
197
191
.ti -1c
198
 
.RI "u_long \fBuatime_hdiff\fP (\fBmarker_t\fP first, \fBmarker_t\fP second)"
 
192
.RI "u_long \fBuatime_hdiff\fP (marker_t first, marker_t second)"
199
193
.br
200
194
.RI "\fIReturns the difference (in u_long 1/100th secs) between the two markers (functionally this is what sysUpTime needs). \fP"
201
195
.ti -1c
202
 
.RI "int \fBatime_ready\fP (\fBmarker_t\fP pm, int deltaT)"
203
 
.br
204
 
.RI "\fITest: Has (marked time plus delta) exceeded current time (in msec) ? Returns 0 if test fails or cannot be tested (no marker). \fP"
205
 
.ti -1c
206
 
.RI "int \fBuatime_ready\fP (\fBmarker_t\fP pm, unsigned int deltaT)"
207
 
.br
208
 
.RI "\fITest: Has (marked time plus delta) exceeded current time (in msec) ? Returns 0 if test fails or cannot be tested (no marker). \fP"
209
 
.ti -1c
210
 
.RI "int \fBmarker_tticks\fP (\fBmarker_t\fP pm)"
 
196
.RI "int \fBatime_ready\fP (marker_t pm, int deltaT)"
 
197
.br
 
198
.RI "\fITest: Has (marked time plus delta) exceeded current time (in msec) ? Returns 0 if test fails or cannot be tested (no marker). \fP"
 
199
.ti -1c
 
200
.RI "int \fBuatime_ready\fP (marker_t pm, unsigned int deltaT)"
 
201
.br
 
202
.RI "\fITest: Has (marked time plus delta) exceeded current time (in msec) ? Returns 0 if test fails or cannot be tested (no marker). \fP"
 
203
.ti -1c
 
204
.RI "int \fBmarker_tticks\fP (marker_t pm)"
211
205
.br
212
206
.RI "\fIReturn the number of timeTicks since the given marker. \fP"
213
207
.ti -1c
216
210
.ti -1c
217
211
.RI "char * \fBnetsnmp_getenv\fP (const char *name)"
218
212
.br
219
 
.RI "\fINon Windows: Returns a pointer to the desired environment variable or NULL if the environment variable does not exist. \fP"
 
213
.RI "\fINon Windows: Returns a pointer to the desired environment \fBvariable\fP or NULL if the environment \fBvariable\fP does not exist. \fP"
220
214
.ti -1c
221
215
.RI "int \fBnetsnmp_addrstr_hton\fP (char *ptr, size_t len)"
222
216
.br
223
217
.in -1c
224
218
.SH "Define Documentation"
225
219
.PP 
226
 
.SS "#define DIFFTIMEVAL(now, then, diff)"
227
 
.PP
228
 
\fBValue:\fP
 
220
.SS "#define DIFFTIMEVAL(now, then, diff)"\fBValue:\fP
229
221
.PP
230
222
.nf
231
 
{                                                        \
 
223
{                                                       \
232
224
        now.tv_sec--;                                   \
233
225
        now.tv_usec += 1000000L;                        \
234
226
        diff.tv_sec  = now.tv_sec  - then.tv_sec;       \
241
233
.fi
242
234
.PP
243
235
Definition at line 131 of file tools.h.
244
 
.SS "#define ISTRANSFORM(ttype, toid)"
245
 
.PP
246
 
\fBValue:\fP
 
236
.SS "#define ISTRANSFORM(ttype, toid)"\fBValue:\fP
247
237
.PP
248
238
.nf
249
239
!snmp_oid_compare(ttype, USM_LENGTH_OID_TRANSFORM,            \
251
241
.fi
252
242
.PP
253
243
Definition at line 150 of file tools.h.
254
 
.SS "#define QUITFUN(e, l)"
255
 
.PP
256
 
\fBValue:\fP
 
244
.SS "#define QUITFUN(e, l)"\fBValue:\fP
257
245
.PP
258
246
.nf
259
247
if ( (e) != SNMPERR_SUCCESS) {   \
268
256
Frees a pointer only if it is !NULL and sets its value to NULL. 
269
257
.PP
270
258
Definition at line 53 of file tools.h.
271
 
.PP
272
 
Referenced by _sess_read(), build_oid_segment(), clear_callback(), clear_context(), clear_lookup_cache(), convert_v2pdu_to_v1(), create_user_from_session(), dump_chunk(), fprint_description(), fprint_objid(), fprint_value(), fprint_variable(), free_agent_snmp_session(), get_module_node(), get_node(), get_set_cache(), netsnmp_addrcache_add(), netsnmp_agent_check_packet(), netsnmp_agent_check_parse(), netsnmp_cache_reqinfo_extract(), netsnmp_cache_reqinfo_insert(), netsnmp_config_remember_free_list(), netsnmp_create_handler(), netsnmp_fixup_mib_directory(), netsnmp_free_agent_request_info(), netsnmp_free_all_list_data(), netsnmp_free_cachemap(), netsnmp_free_delegated_cache(), netsnmp_free_list_data(), netsnmp_getenv(), netsnmp_handler_free(), netsnmp_handler_registration_free(), netsnmp_init_mib(), netsnmp_iterator_delete_table(), netsnmp_reassign_requests(), netsnmp_register_agent_nsap(), netsnmp_register_old_api(), netsnmp_remove_loghandler(), netsnmp_row_merge_helper_handler(), netsnmp_sess_log_error(), netsnmp_set_mib_directory(), netsnmp_set_row_column(), netsnmp_sprint_realloc_objid(), netsnmp_sprint_realloc_objid_tree(), netsnmp_subtree_free(), netsnmp_subtree_join(), netsnmp_subtree_split(), netsnmp_table_build_oid_from_index(), netsnmp_table_data_delete_row(), netsnmp_table_data_delete_table(), netsnmp_table_data_set_helper_handler(), netsnmp_table_dataset_delete_data(), netsnmp_tcontainer_create_table(), netsnmp_tcontainer_delete_table(), netsnmp_tdata_clone_row(), netsnmp_tdata_delete_row(), netsnmp_tdata_delete_table(), netsnmp_wrap_up_request(), parse_octet_hint(), read_objid(), shutdown_mib(), snmp_add_var(), snmp_free_pdu(), snmp_free_var(), snmp_sess_close(), snmp_unregister_callback(), snmpv3_make_report(), snmpv3_parse(), table_helper_handler(), unregister_all_config_handlers(), unregister_config_handler(), and unregister_mibs_by_session().
273
259
.SS "#define SNMP_MACRO_VAL_TO_STR(s)   SNMP_MACRO_VAL_TO_STR_PRIV(s)"
274
260
.PP
275
 
Expands to string with value of the s. 
276
 
.PP
277
 
If s is macro, the resulting string is value of the macro. Example: define TEST 1234 \fBSNMP_MACRO_VAL_TO_STR(TEST)\fP expands to '1234' SNMP_MACRO_VAL_TO_STR(TEST+1) expands to '1234+1' 
 
261
Expands to string with value of the s. If s is macro, the resulting string is value of the macro. Example: define TEST 1234 \fBSNMP_MACRO_VAL_TO_STR(TEST)\fP expands to '1234' SNMP_MACRO_VAL_TO_STR(TEST+1) expands to '1234+1' 
278
262
.PP
279
263
Definition at line 99 of file tools.h.
280
264
.SS "#define SNMP_MALLOC_STRUCT(s)   (struct s *) calloc(1, sizeof(struct s))"
282
266
Mallocs memory of sizeof(struct s), zeros it and returns a pointer to it. 
283
267
.PP
284
268
Definition at line 64 of file tools.h.
285
 
.PP
286
 
Referenced by netsnmp_config_remember_in_list(), netsnmp_create_subtree_cache(), netsnmp_register_callback(), snmp_alarm_register(), and snmp_alarm_register_hr().
287
269
.SS "#define SNMP_MALLOC_TYPEDEF(td)   (td *) calloc(1, sizeof(td))"
288
270
.PP
289
271
Mallocs memory of sizeof(t), zeros it and returns a pointer to it. 
290
272
.PP
291
273
Definition at line 68 of file tools.h.
292
 
.PP
293
 
Referenced by add_subtree(), get_context_lookup_cache(), init_agent_snmp_session(), netsnmp_baby_steps_handler_get(), netsnmp_cache_create(), netsnmp_container_get_null(), netsnmp_container_iterator_get(), netsnmp_container_table_handler_get(), netsnmp_create_data_list(), netsnmp_create_delegated_cache(), netsnmp_create_handler(), netsnmp_create_table_data(), netsnmp_create_table_data_row(), netsnmp_create_table_data_set(), netsnmp_create_watcher_info(), netsnmp_ds_register_config(), netsnmp_ds_register_premib(), netsnmp_get_new_stash_cache(), netsnmp_get_or_add_local_cachid(), netsnmp_get_scalar_group_handler(), netsnmp_handler_registration_create(), netsnmp_iterator_create_table(), netsnmp_mark_row_column_writable(), netsnmp_mode_end_call_add_mode_callback(), netsnmp_oid_stash_create_sized_node(), netsnmp_register_auto_data_table(), netsnmp_register_loghandler(), netsnmp_register_mib_table_row(), netsnmp_register_num_file_instance(), netsnmp_register_old_api(), netsnmp_register_save_list(), netsnmp_register_table_data_set(), netsnmp_row_merge_status_get(), netsnmp_set_row_column(), netsnmp_stash_to_next_helper(), netsnmp_table_container_register(), netsnmp_table_data_create_row(), netsnmp_table_data_set_create_newrowstash(), netsnmp_table_data_set_helper_handler(), netsnmp_table_iterator_helper_handler(), netsnmp_table_set_add_default_row(), netsnmp_tcontainer_create_table(), netsnmp_tdata_create_row(), netsnmp_tdata_create_table(), save_set_cache(), snmp_varlist_add_variable(), and table_helper_handler().
294
274
.SS "#define SNMP_MAX(a, b)   ((a) > (b) ? (a) : (b))"
295
275
.PP
296
276
Computers the maximum of a and b. 
297
277
.PP
298
278
Definition at line 85 of file tools.h.
299
 
.PP
300
 
Referenced by netsnmp_config_parse_table_set(), netsnmp_create_subtree_cache(), and netsnmp_register_table_data_set().
301
279
.SS "#define SNMP_MIN(a, b)   ((a) > (b) ? (b) : (a))"
302
280
.PP
303
281
Computers the minimum of a and b. 
304
282
.PP
305
283
Definition at line 89 of file tools.h.
306
 
.PP
307
 
Referenced by netsnmp_config_parse_table_set(), netsnmp_oid_find_prefix(), netsnmp_register_table_data_set(), netsnmp_scalar_group_helper_handler(), netsnmp_scalar_helper_handler(), netsnmp_stash_to_next_helper(), netsnmp_table_data_helper_handler(), and sprint_realloc_octet_string().
308
284
.SS "#define SNMP_SWIPE_MEM(n, s)   do { if (n) free((void *)n); n = s; s=NULL; } while(0)"
309
285
.PP
310
286
Frees pointer n only if it is !NULL, sets n to s and sets s to NULL. 
317
293
Definition at line 72 of file tools.h.
318
294
.SH "Function Documentation"
319
295
.PP 
320
 
.SS "long atime_diff (\fBmarker_t\fP first, \fBmarker_t\fP second)"
 
296
.SS "long atime_diff (marker_t first, marker_t second)"
321
297
.PP
322
298
Returns the difference (in msec) between the two markers. 
323
299
.PP
324
300
Definition at line 795 of file tools.c.
325
 
.PP
326
 
Referenced by atime_ready(), and marker_tticks().
327
 
.SS "\fBmarker_t\fP atime_newMarker (void)"
328
 
.PP
329
 
create a new time marker. 
330
 
.PP
331
 
NOTE: Caller must free time marker when no longer needed. 
 
301
.SS "marker_t atime_newMarker (void)"
 
302
.PP
 
303
create a new time marker. NOTE: Caller must free time marker when no longer needed. 
332
304
.PP
333
305
Definition at line 771 of file tools.c.
334
 
.PP
335
 
Referenced by atime_ready(), marker_tticks(), and uatime_ready().
336
 
.SS "int atime_ready (\fBmarker_t\fP pm, int deltaT)"
 
306
.SS "int atime_ready (marker_t pm, int deltaT)"
337
307
.PP
338
308
Test: Has (marked time plus delta) exceeded current time (in msec) ? Returns 0 if test fails or cannot be tested (no marker). 
339
309
.PP
340
310
Definition at line 850 of file tools.c.
341
 
.PP
342
 
References atime_diff(), and atime_newMarker().
343
 
.PP
344
 
Referenced by netsnmp_cache_check_expired().
345
 
.SS "void atime_setMarker (\fBmarker_t\fP pm)"
 
311
.SS "void atime_setMarker (marker_t pm)"
346
312
.PP
347
313
set a time marker. 
348
314
.PP
349
315
Definition at line 782 of file tools.c.
350
316
.SS "u_int binary_to_hex (const u_char * input, size_t len, char ** output)"
351
317
.PP
352
 
converts binary to hexidecimal 
353
 
.PP
354
 
\fBParameters:\fP
 
318
converts binary to hexidecimal \fBParameters:\fP
355
319
.RS 4
356
320
\fI*input\fP Binary data. 
357
321
.br
368
332
FIX Is there already one of these in the UCD SNMP codebase? The old one should be used, or this one should be moved to \fBsnmplib/snmp_api.c\fP. 
369
333
.PP
370
334
Definition at line 287 of file tools.c.
371
 
.PP
372
 
References VAL2HEX.
373
 
.PP
374
 
Referenced by dump_chunk().
375
335
.SS "void free_zero (void * buf, size_t size)"
376
336
.PP
377
 
zeros memory before freeing it. 
378
 
.PP
379
 
\fBParameters:\fP
 
337
zeros memory before freeing it. \fBParameters:\fP
380
338
.RS 4
381
339
\fI*buf\fP Pointer at bytes to free. 
382
340
.br
386
344
 
387
345
.PP
388
346
Definition at line 185 of file tools.c.
389
 
.PP
390
 
Referenced by hex_to_binary2(), and malloc_random().
391
347
.SS "int hex_to_binary2 (const u_char * input, size_t len, char ** output)"
392
348
.PP
393
 
hex_to_binary2 
394
 
.PP
395
 
\fBParameters:\fP
 
349
hex_to_binary2 \fBParameters:\fP
396
350
.RS 4
397
351
\fI*input\fP Printable data in base16. 
398
352
.br
411
365
FIX Another version of 'hex-to-binary' which takes odd length input strings. It also allocates the memory to hold the binary data. Should be integrated with the official hex_to_binary() function. 
412
366
.PP
413
367
Definition at line 324 of file tools.c.
414
 
.PP
415
 
References free_zero(), HEX2VAL, and NULL.
416
368
.SS "u_char* malloc_random (size_t * size)"
417
369
.PP
418
 
Returns pointer to allocaed & set buffer on success, size contains number of random bytes filled. 
419
 
.PP
420
 
buf is NULL and *size set to KMT error value upon failure.
 
370
Returns pointer to allocaed & set buffer on success, size contains number of random bytes filled. buf is NULL and *size set to KMT error value upon failure.
421
371
.PP
422
372
\fBParameters:\fP
423
373
.RS 4
432
382
 
433
383
.PP
434
384
Definition at line 205 of file tools.c.
435
 
.PP
436
 
References free_zero(), and NULL.
437
 
.SS "int marker_tticks (\fBmarker_t\fP pm)"
 
385
.SS "int marker_tticks (marker_t pm)"
438
386
.PP
439
387
Return the number of timeTicks since the given marker. 
440
388
.PP
441
389
Definition at line 898 of file tools.c.
442
 
.PP
443
 
References atime_diff(), and atime_newMarker().
444
 
.PP
445
 
Referenced by timeval_tticks().
446
390
.SS "int memdup (u_char ** to, const u_char * from, size_t size)"
447
391
.PP
448
 
Duplicates a memory block. 
449
 
.PP
450
 
Copies a existing memory location from a pointer to another, newly malloced, pointer.
 
392
Duplicates a memory block. Copies a existing memory location from a pointer to another, newly malloced, pointer.
451
393
.PP
452
394
\fBParameters:\fP
453
395
.RS 4
466
408
 
467
409
.PP
468
410
Definition at line 236 of file tools.c.
469
 
.PP
470
 
References NULL.
471
 
.PP
472
 
Referenced by convert_v2pdu_to_v1(), create_user_from_session(), netsnmp_handler_registration_create(), netsnmp_handler_registration_dup(), netsnmp_instance_int_handler(), netsnmp_instance_long_handler(), netsnmp_instance_num_file_handler(), netsnmp_instance_uint_handler(), netsnmp_instance_ulong_handler(), netsnmp_register_old_api(), netsnmp_set_row_column(), netsnmp_table_data_clone_row(), netsnmp_table_data_copy_row(), netsnmp_table_data_set_clone_row(), netsnmp_table_row_register(), netsnmp_table_set_add_default_row(), netsnmp_tdata_clone_row(), netsnmp_tdata_copy_row(), netsnmp_watcher_helper_handler(), send_trap_to_sess(), and snmpd_parse_config_trapsess().
473
411
.SS "char* netsnmp_getenv (const char * name)"
474
412
.PP
475
 
Non Windows: Returns a pointer to the desired environment variable or NULL if the environment variable does not exist. 
476
 
.PP
477
 
Windows: Returns a pointer to the desired environment variable if it exists. If it does not, the variable is looked up in the registry in HKCU\\Net-SNMP or HKLM\\Net-SNMP (whichever it finds first) and stores the result in the environment variable. It then returns a pointer to environment variable. 
 
413
Non Windows: Returns a pointer to the desired environment \fBvariable\fP or NULL if the environment \fBvariable\fP does not exist. Windows: Returns a pointer to the desired environment \fBvariable\fP if it exists. If it does not, the \fBvariable\fP is looked up in the registry in HKCU\\Net-SNMP or HKLM\\Net-SNMP (whichever it finds first) and stores the result in the environment \fBvariable\fP. It then returns a pointer to environment \fBvariable\fP. 
478
414
.PP
479
415
Definition at line 926 of file tools.c.
480
 
.PP
481
 
References NULL, and SNMP_FREE.
482
 
.PP
483
 
Referenced by get_configuration_directory(), get_persistent_directory(), netsnmp_fixup_mib_directory(), netsnmp_get_mib_directory(), netsnmp_init_mib(), read_config_files(), and read_config_store().
484
416
.SS "int netsnmp_hex_to_binary (u_char ** buf, size_t * buf_len, size_t * offset, int allow_realloc, const char * hex, const char * delim)"
485
417
.PP
486
 
convert an ASCII hex string (with specified delimiters) to binary 
487
 
.PP
488
 
\fBParameters:\fP
 
418
convert an ASCII hex string (with specified delimiters) to binary \fBParameters:\fP
489
419
.RS 4
490
420
\fIbuf\fP address of a pointer (pointer to pointer) for the output buffer. If allow_realloc is set, the buffer may be grown via snmp_realloc to accomodate the data.
491
421
.br
510
440
 
511
441
.PP
512
442
Definition at line 425 of file tools.c.
513
 
.PP
514
 
References NULL, and snmp_realloc().
515
 
.PP
516
 
Referenced by snmp_hex_to_binary().
517
443
.SS "char* netsnmp_strdup_and_null (const u_char * from, size_t from_len)"
518
444
.PP
519
445
copies a (possible) unterminated string of a given length into a new buffer and null terminates it as well (new buffer MAY be one byte longer to account for this 
520
446
.PP
521
447
Definition at line 255 of file tools.c.
522
 
.PP
523
 
References NULL.
524
 
.PP
525
 
Referenced by netsnmp_table_data_set_helper_handler().
526
448
.SS "int snmp_hex_to_binary (u_char ** buf, size_t * buf_len, size_t * offset, int allow_realloc, const char * hex)"
527
449
.PP
528
 
convert an ASCII hex string to binary 
529
 
.PP
530
 
\fBNote:\fP
 
450
convert an ASCII hex string to binary \fBNote:\fP
531
451
.RS 4
532
452
This is a wrapper which calls netsnmp_hex_to_binary with a delimiter string of ' '.
533
453
.RE
544
464
 
545
465
.PP
546
466
Definition at line 485 of file tools.c.
547
 
.PP
548
 
References netsnmp_hex_to_binary().
549
 
.PP
550
 
Referenced by create_user_from_session(), and snmp_add_var().
551
467
.SS "int snmp_realloc (u_char ** buf, size_t * buf_len)"
552
468
.PP
553
 
This function increase the size of the buffer pointed at by *buf, which is initially of size *buf_len. 
554
 
.PP
555
 
Contents are preserved **AT THE BOTTOM END OF THE BUFFER**. If memory can be (re-)allocated then it returns 1, else it returns 0.
 
469
This function increase the size of the buffer pointed at by *buf, which is initially of size *buf_len. Contents are preserved **AT THE BOTTOM END OF THE BUFFER**. If memory can be (re-)allocated then it returns 1, else it returns 0.
556
470
.PP
557
471
\fBParameters:\fP
558
472
.RS 4
569
483
 
570
484
.PP
571
485
Definition at line 121 of file tools.c.
572
 
.PP
573
 
References NULL.
574
 
.PP
575
 
Referenced by _sprint_hexstring_line(), asn_realloc(), dump_realloc_oid_to_string(), netsnmp_hex_to_binary(), snmp_add_var(), snmp_decimal_to_binary(), snmp_strcat(), sprint_realloc_asciistring(), sprint_realloc_ipaddress(), sprint_realloc_networkaddress(), and sprint_realloc_octet_string().
576
 
.SS "u_long uatime_diff (\fBmarker_t\fP first, \fBmarker_t\fP second)"
 
486
.SS "u_long uatime_diff (marker_t first, marker_t second)"
577
487
.PP
578
488
Returns the difference (in u_long msec) between the two markers. 
579
489
.PP
580
490
Definition at line 812 of file tools.c.
581
 
.PP
582
 
Referenced by uatime_ready().
583
 
.SS "u_long uatime_hdiff (\fBmarker_t\fP first, \fBmarker_t\fP second)"
 
491
.SS "u_long uatime_hdiff (marker_t first, marker_t second)"
584
492
.PP
585
493
Returns the difference (in u_long 1/100th secs) between the two markers (functionally this is what sysUpTime needs). 
586
494
.PP
587
495
Definition at line 830 of file tools.c.
588
 
.PP
589
 
Referenced by netsnmp_marker_uptime().
590
 
.SS "int uatime_ready (\fBmarker_t\fP pm, unsigned int deltaT)"
 
496
.SS "int uatime_ready (marker_t pm, unsigned int deltaT)"
591
497
.PP
592
498
Test: Has (marked time plus delta) exceeded current time (in msec) ? Returns 0 if test fails or cannot be tested (no marker). 
593
499
.PP
594
500
Definition at line 872 of file tools.c.
595
 
.PP
596
 
References atime_newMarker(), and uatime_diff().
 
501
.SH "Author"
 
502
.PP 
 
503
Generated automatically by Doxygen for net-snmp from the source code.