Main Page | Modules | Directories | File List | Globals | Related Pages

I/O

I/O functions. More...

Defines

#define STP_LOG_BUF_LEN   2047
 private buffer for _stp_log()

Functions

void _stp_log (const char *fmt,...)
 Logs Data.
int _stp_netlink_open (void)
 Opens netlink and relayfs connections to stpd.
void _stp_netlink_close (void)
 Closes netlink and relayfs connections to stpd.

Detailed Description

I/O functions.


Function Documentation

void _stp_log const char *  fmt,
  ...
 

Logs Data.

This function prints to the system log if stpd has not connected yet. Otherwise it sends the message immediately to stpd.

Parameters:
fmt A variable number of args.
Note:
Lines are limited in length by printk buffer. If there is no newline in the format string, then other syslog output could get appended to the SystemTap line.
Todo:
Evaluate if this function is necessary.

Definition at line 29 of file io.c.

References STP_LOG_BUF_LEN.

Referenced by _stp_list_clear(), _stp_register_jprobes(), _stp_register_kprobes(), _stp_stack_sprint(), _stp_string_init(), _stp_unregister_jprobes(), and _stp_unregister_kprobes().

void _stp_netlink_close void   ) 
 

Closes netlink and relayfs connections to stpd.

This must be called after all I/O is done, probably at the end of module cleanup.

Returns:
0 on success. -1 if there is a problem establishing a connection.

Definition at line 103 of file io.c.

int _stp_netlink_open void   ) 
 

Opens netlink and relayfs connections to stpd.

This must be called before any I/O is done, probably at the start of module initialization.

Definition at line 87 of file io.c.