PAPI  5.3.2.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
linux-net.c File Reference

net component This file contains the source code for a component that enables PAPI-C to access network statistics through the /proc file system. This component will dynamically create a native events table for all the interfaces listed in /proc/net/dev (16 entries for each interface). More...

Include dependency graph for linux-net.c:

Go to the source code of this file.

Data Structures

struct  temp_event
 
struct  net_counters
 

Macros

#define NET_REFRESH_LATENCY   1000000
 
#define NET_PROC_FILE   "/proc/net/dev"
 
#define NET_PROC_MAX_LINE   (IFNAMSIZ + 16 * (20 + 1) + 16)
 
#define NET_INVALID_RESULT   -1
 
#define NET_INTERFACE_COUNTERS   16
 

Functions

static int generateNetEventList (void)
 
static int getInterfaceBaseIndex (const char *ifname)
 
static int read_net_counters (long long *values)
 
int _net_init_thread (hwd_context_t *ctx)
 
int _net_init_component (int cidx)
 
int _net_init_control_state (hwd_control_state_t *ctl)
 
int _net_start (hwd_context_t *ctx, hwd_control_state_t *ctl)
 
int _net_read (hwd_context_t *ctx, hwd_control_state_t *ctl, long long **events, int flags)
 
int _net_stop (hwd_context_t *ctx, hwd_control_state_t *ctl)
 
int _net_shutdown_thread (hwd_context_t *ctx)
 
int _net_shutdown_component (void)
 
int _net_ctl (hwd_context_t *ctx, int code, _papi_int_option_t *option)
 
int _net_update_control_state (hwd_control_state_t *ctl, NativeInfo_t *native, int count, hwd_context_t *ctx)
 
int _net_set_domain (hwd_control_state_t *ctl, int domain)
 
int _net_reset (hwd_context_t *ctx, hwd_control_state_t *ctl)
 
int _net_ntv_enum_events (unsigned int *EventCode, int modifier)
 
int _net_ntv_name_to_code (char *name, unsigned int *EventCode)
 
int _net_ntv_code_to_name (unsigned int EventCode, char *name, int len)
 
int _net_ntv_code_to_descr (unsigned int EventCode, char *name, int len)
 
int _net_ntv_code_to_bits (unsigned int EventCode, hwd_register_t *bits)
 

Variables

papi_vector_t _net_vector
 
static NET_native_event_entry_t_net_native_events
 
static int num_events = 0
 
static int is_initialized = 0
 
static long long _net_register_start [NET_MAX_COUNTERS]
 
static long long _net_register_current [NET_MAX_COUNTERS]
 
static struct temp_eventroot = NULL
 
static struct net_counters _net_counter_info [NET_INTERFACE_COUNTERS]
 

Detailed Description

Author
Haihang You you@c.nosp@m.s.ut.nosp@m.k.edu
Jose Pedro Oliveira jpo@d.nosp@m.i.um.nosp@m.inho..nosp@m.pt

Definition in file linux-net.c.

Macro Definition Documentation

#define NET_INTERFACE_COUNTERS   16

Definition at line 71 of file linux-net.c.

#define NET_INVALID_RESULT   -1

Definition at line 51 of file linux-net.c.

#define NET_PROC_FILE   "/proc/net/dev"

Definition at line 44 of file linux-net.c.

#define NET_PROC_MAX_LINE   (IFNAMSIZ + 16 * (20 + 1) + 16)

Definition at line 49 of file linux-net.c.

#define NET_REFRESH_LATENCY   1000000

Definition at line 42 of file linux-net.c.

Function Documentation

int _net_ctl ( hwd_context_t ctx,
int  code,
_papi_int_option_t option 
)

Definition at line 463 of file linux-net.c.

464 {
465  ( void ) ctx;
466  ( void ) code;
467  ( void ) option;
468 
469  return PAPI_OK;
470 }
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
int _net_init_component ( int  cidx)

Definition at line 299 of file linux-net.c.

300 {
301  int i = 0;
302  struct temp_event *t, *last;
303 
304  if ( is_initialized )
305  return PAPI_OK;
306 
311 
312  is_initialized = 1;
313 
314  /* The network interfaces are listed in /proc/net/dev */
316 
317  if ( num_events < 0 ) /* PAPI errors */
318  return num_events;
319 
320  if ( num_events == 0 ) /* No network interfaces found */
321  return PAPI_OK;
322 
323  t = root;
326  do {
327  strncpy(_net_native_events[i].name, t->name, PAPI_MAX_STR_LEN);
330  last = t;
331  t = t->next;
332  papi_free(last);
333  i++;
334  } while (t != NULL);
335  root = NULL;
336 
337  /* Export the total number of events available */
339 
340  /* Export the component id */
342 
343  return PAPI_OK;
344 }
memset(eventId, 0, size)
#define papi_free(a)
Definition: papi_memory.h:35
#define PAPI_MAX_STR_LEN
Definition: fpapi.h:43
static long long _net_register_start[NET_MAX_COUNTERS]
Definition: linux-net.c:59
#define papi_malloc(a)
Definition: papi_memory.h:34
static int num_events
papi_vector_t _net_vector
Definition: linux-net.c:35
return PAPI_OK
Definition: linux-nvml.c:458
PAPI_component_info_t cmp_info
Definition: papi_vector.h:20
static int is_initialized
Definition: linux-net.c:57
struct temp_event * next
char name[PAPI_MAX_STR_LEN]
t
Definition: iozone.c:23562
Definition: linux-net.h:52
int i
Definition: fileop.c:140
#define NET_MAX_COUNTERS
Definition: linux-net.h:34
static int cidx
Definition: event_info.c:40
unsigned int selector
Definition: linux-net.h:40
char description[PAPI_MAX_STR_LEN]
static NET_native_event_entry_t * _net_native_events
Definition: linux-net.c:54
static struct temp_event * last
static int generateNetEventList(void)
Definition: linux-net.c:106
NET_register_t resources
Definition: linux-net.h:54
static struct temp_event * root
Definition: linux-net.c:68
char * name
Definition: iozone.c:23648
static long long _net_register_current[NET_MAX_COUNTERS]
Definition: linux-net.c:60

Here is the call graph for this function:

int _net_init_control_state ( hwd_control_state_t ctl)

Definition at line 352 of file linux-net.c.

353 {
354  ( void ) ctl;
355 
356  return PAPI_OK;
357 }
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
int _net_init_thread ( hwd_context_t ctx)

Definition at line 286 of file linux-net.c.

287 {
288  ( void ) ctx;
289 
290  return PAPI_OK;
291 }
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
int _net_ntv_code_to_bits ( unsigned int  EventCode,
hwd_register_t bits 
)

Definition at line 615 of file linux-net.c.

616 {
617  int index = EventCode;
618 
619  if ( index >= 0 && index < num_events ) {
620  memcpy( ( NET_register_t * ) bits,
621  &( _net_native_events[index].resources ),
622  sizeof ( NET_register_t ) );
623  return PAPI_OK;
624  }
625 
626  return PAPI_ENOEVNT;
627 }
#define PAPI_ENOEVNT
Definition: fpapi.h:112
static int num_events
return PAPI_OK
Definition: linux-nvml.c:458
static NET_native_event_entry_t * _net_native_events
Definition: linux-net.c:54
int _net_ntv_code_to_descr ( unsigned int  EventCode,
char *  name,
int  len 
)

Definition at line 598 of file linux-net.c.

599 {
600  int index = EventCode;
601 
602  if ( index >= 0 && index < num_events ) {
603  strncpy( name, _net_native_events[index].description, len );
604  return PAPI_OK;
605  }
606 
607  return PAPI_ENOEVNT;
608 }
#define PAPI_ENOEVNT
Definition: fpapi.h:112
static int num_events
return PAPI_OK
Definition: linux-nvml.c:458
char description[PAPI_MAX_STR_LEN]
static NET_native_event_entry_t * _net_native_events
Definition: linux-net.c:54
char * name
Definition: iozone.c:23648
int _net_ntv_code_to_name ( unsigned int  EventCode,
char *  name,
int  len 
)

Definition at line 581 of file linux-net.c.

582 {
583  int index = EventCode;
584 
585  if ( index >= 0 && index < num_events ) {
586  strncpy( name, _net_native_events[index].name, len );
587  return PAPI_OK;
588  }
589 
590  return PAPI_ENOEVNT;
591 }
#define PAPI_ENOEVNT
Definition: fpapi.h:112
static int num_events
return PAPI_OK
Definition: linux-nvml.c:458
static NET_native_event_entry_t * _net_native_events
Definition: linux-net.c:54
char * name
Definition: iozone.c:23648
int _net_ntv_enum_events ( unsigned int EventCode,
int  modifier 
)

Definition at line 526 of file linux-net.c.

527 {
528  int index;
529 
530  switch ( modifier ) {
531  case PAPI_ENUM_FIRST:
532  if (num_events==0) {
533  return PAPI_ENOEVNT;
534  }
535  *EventCode = 0;
536  return PAPI_OK;
537  break;
538 
539  case PAPI_ENUM_EVENTS:
540  index = *EventCode;
541  if ( index < num_events - 1 ) {
542  *EventCode = *EventCode + 1;
543  return PAPI_OK;
544  } else {
545  return PAPI_ENOEVNT;
546  }
547  break;
548 
549  default:
550  return PAPI_EINVAL;
551  break;
552  }
553  return PAPI_EINVAL;
554 }
#define PAPI_ENOEVNT
Definition: fpapi.h:112
static int num_events
return PAPI_OK
Definition: linux-nvml.c:458
return PAPI_EINVAL
Definition: linux-nvml.c:408
int _net_ntv_name_to_code ( char *  name,
unsigned int EventCode 
)

Definition at line 561 of file linux-net.c.

562 {
563  int i;
564 
565  for ( i=0; i<num_events; i++) {
566  if (strcmp(name, _net_native_events[i].name) == 0) {
567  *EventCode = i;
568 
569  return PAPI_OK;
570  }
571  }
572 
573  return PAPI_ENOEVNT;
574 }
#define PAPI_ENOEVNT
Definition: fpapi.h:112
static int num_events
return PAPI_OK
Definition: linux-nvml.c:458
int i
Definition: fileop.c:140
static NET_native_event_entry_t * _net_native_events
Definition: linux-net.c:54
char * name
Definition: iozone.c:23648
int _net_read ( hwd_context_t ctx,
hwd_control_state_t ctl,
long long **  events,
int  flags 
)

Definition at line 383 of file linux-net.c.

385 {
386  (void) flags;
387  (void) ctx;
388 
389  NET_control_state_t *net_ctl = (NET_control_state_t *) ctl;
390  long long now = PAPI_get_real_usec();
391  int i;
392 
393  /* Caching
394  * Only read new values from /proc if enough time has passed
395  * since the last read.
396  */
397  if ( now - net_ctl->lastupdate > NET_REFRESH_LATENCY ) {
399  for ( i=0; i<NET_MAX_COUNTERS; i++ ) {
401  }
402  net_ctl->lastupdate = now;
403  }
404  *events = net_ctl->values;
405 
406  return PAPI_OK;
407 }
long long flags
Definition: iozone.c:12330
long long values[NET_MAX_COUNTERS]
Definition: linux-net.h:68
static long long _net_register_start[NET_MAX_COUNTERS]
Definition: linux-net.c:59
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
int i
Definition: fileop.c:140
#define NET_MAX_COUNTERS
Definition: linux-net.h:34
char events[MAX_EVENTS][BUFSIZ]
long long lastupdate
Definition: linux-net.h:69
long long PAPI_get_real_usec(void)
Definition: papi.c:6138
#define NET_REFRESH_LATENCY
Definition: linux-net.c:42
static int read_net_counters(long long *values)
Definition: linux-net.c:200
static long long _net_register_current[NET_MAX_COUNTERS]
Definition: linux-net.c:60

Here is the call graph for this function:

int _net_reset ( hwd_context_t ctx,
hwd_control_state_t ctl 
)

Definition at line 513 of file linux-net.c.

514 {
515  ( void ) ctx;
516  ( void ) ctl;
517 
518  return PAPI_OK;
519 }
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
int _net_set_domain ( hwd_control_state_t ctl,
int  domain 
)

Definition at line 502 of file linux-net.c.

503 {
504  ( void ) ctl;
505  if ( PAPI_DOM_ALL != domain )
506  return PAPI_EINVAL;
507 
508  return PAPI_OK;
509 }
#define PAPI_DOM_ALL
Definition: fpapi.h:25
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
return PAPI_EINVAL
Definition: linux-nvml.c:408
int _net_shutdown_component ( void  )

Definition at line 445 of file linux-net.c.

446 {
447  if ( is_initialized ) {
448  is_initialized = 0;
450  _net_native_events = NULL;
451  }
452 
453  return PAPI_OK;
454 }
#define papi_free(a)
Definition: papi_memory.h:35
return PAPI_OK
Definition: linux-nvml.c:458
static int is_initialized
Definition: linux-net.c:57
static NET_native_event_entry_t * _net_native_events
Definition: linux-net.c:54
int _net_shutdown_thread ( hwd_context_t ctx)

Definition at line 433 of file linux-net.c.

434 {
435  ( void ) ctx;
436 
437  return PAPI_OK;
438 }
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
int _net_start ( hwd_context_t ctx,
hwd_control_state_t ctl 
)

Definition at line 361 of file linux-net.c.

362 {
363  ( void ) ctx;
364 
365  NET_control_state_t *net_ctl = (NET_control_state_t *) ctl;
366  long long now = PAPI_get_real_usec();
367 
371 
372  /* set initial values to 0 */
373  memset(net_ctl->values, 0, NET_MAX_COUNTERS*sizeof(net_ctl->values[0]));
374 
375  /* Set last access time for caching purposes */
376  net_ctl->lastupdate = now;
377 
378  return PAPI_OK;
379 }
memset(eventId, 0, size)
long long values[NET_MAX_COUNTERS]
Definition: linux-net.h:68
static long long _net_register_start[NET_MAX_COUNTERS]
Definition: linux-net.c:59
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
#define NET_MAX_COUNTERS
Definition: linux-net.h:34
long long lastupdate
Definition: linux-net.h:69
long long PAPI_get_real_usec(void)
Definition: papi.c:6138
static int read_net_counters(long long *values)
Definition: linux-net.c:200
static long long _net_register_current[NET_MAX_COUNTERS]
Definition: linux-net.c:60

Here is the call graph for this function:

int _net_stop ( hwd_context_t ctx,
hwd_control_state_t ctl 
)

Definition at line 411 of file linux-net.c.

412 {
413  (void) ctx;
414 
415  NET_control_state_t *net_ctl = (NET_control_state_t *) ctl;
416  long long now = PAPI_get_real_usec();
417  int i;
418 
420  for ( i=0; i<NET_MAX_COUNTERS; i++ ) {
422  }
423  net_ctl->lastupdate = now;
424 
425  return PAPI_OK;
426 }
long long values[NET_MAX_COUNTERS]
Definition: linux-net.h:68
static long long _net_register_start[NET_MAX_COUNTERS]
Definition: linux-net.c:59
return PAPI_OK
Definition: linux-nvml.c:458
void
Definition: iozone.c:18627
int i
Definition: fileop.c:140
#define NET_MAX_COUNTERS
Definition: linux-net.h:34
long long lastupdate
Definition: linux-net.h:69
long long PAPI_get_real_usec(void)
Definition: papi.c:6138
static int read_net_counters(long long *values)
Definition: linux-net.c:200
static long long _net_register_current[NET_MAX_COUNTERS]
Definition: linux-net.c:60

Here is the call graph for this function:

int _net_update_control_state ( hwd_control_state_t ctl,
NativeInfo_t native,
int  count,
hwd_context_t ctx 
)

Definition at line 474 of file linux-net.c.

476 {
477  ( void ) ctx;
478  ( void ) ctl;
479 
480  int i, index;
481 
482  for ( i = 0; i < count; i++ ) {
483  index = native[i].ni_event;
484  native[i].ni_position = _net_native_events[index].resources.selector - 1;
485  }
486 
487  return PAPI_OK;
488 }
return PAPI_OK
Definition: linux-nvml.c:458
int count
Definition: iozone.c:22422
void
Definition: iozone.c:18627
int i
Definition: fileop.c:140
unsigned int selector
Definition: linux-net.h:40
static NET_native_event_entry_t * _net_native_events
Definition: linux-net.c:54
NET_register_t resources
Definition: linux-net.h:54
static int generateNetEventList ( void  )
static

Definition at line 106 of file linux-net.c.

107 {
108  FILE *fin;
109  char line[NET_PROC_MAX_LINE];
110  char *retval, *ifname;
111  int count = 0;
112  struct temp_event *temp;
113  struct temp_event *last = NULL;
114  int i, j;
115 
116  fin = fopen(NET_PROC_FILE, "r");
117  if (fin == NULL) {
118  SUBDBG("Can't find %s, are you sure the /proc file-system is mounted?\n",
119  NET_PROC_FILE);
120  return 0;
121  }
122 
123  /* skip the 2 header lines */
124  for (i=0; i<2; i++) {
125  retval = fgets (line, NET_PROC_MAX_LINE, fin);
126  if (retval == NULL) {
127  fclose(fin);
128  SUBDBG("Not enough lines in %s\n", NET_PROC_FILE);
129  return 0;
130  }
131  }
132 
133  while ((fgets (line, NET_PROC_MAX_LINE, fin)) == line) {
134 
135  /* split the interface name from the 16 counters */
136  retval = strstr(line, ":");
137  if (retval == NULL) {
138  SUBDBG("Wrong line format <%s>\n", line);
139  continue;
140  }
141 
142  *retval = '\0';
143  ifname = line;
144  while (isspace(*ifname)) { ifname++; }
145 
146  for (j=0; j<NET_INTERFACE_COUNTERS; j++) {
147 
148  /* keep the interface name around */
149  temp = (struct temp_event *)papi_malloc(sizeof(struct temp_event));
150  if (!temp) {
151  PAPIERROR("out of memory!");
152  fclose(fin);
153  return PAPI_ENOMEM;
154  }
155  temp->next = NULL;
156 
157  if (root == NULL) {
158  root = temp;
159  } else if (last) {
160  last->next = temp;
161  } else {
162  free(temp);
163  fclose(fin);
164  PAPIERROR("This shouldn't be possible\n");
165  return PAPI_ECMP;
166  }
167  last = temp;
168 
169  snprintf(temp->name, PAPI_MAX_STR_LEN, "%s:%s",
170  ifname, _net_counter_info[j].name);
171  snprintf(temp->description, PAPI_MAX_STR_LEN, "%s %s",
172  ifname, _net_counter_info[j].description);
173 
174  count++;
175  }
176  }
177 
178  fclose(fin);
179 
180  return count;
181 }
#define PAPI_ENOMEM
Definition: fpapi.h:107
#define PAPI_MAX_STR_LEN
Definition: fpapi.h:43
#define papi_malloc(a)
Definition: papi_memory.h:34
static struct net_counters _net_counter_info[NET_INTERFACE_COUNTERS]
int count
Definition: iozone.c:22422
fclose(thread_wqfd)
struct temp_event * next
char * name
Definition: linux-net.c:74
char name[PAPI_MAX_STR_LEN]
int i
Definition: fileop.c:140
free(dummyfile[xx])
#define PAPI_ECMP
Definition: fpapi.h:109
char description[PAPI_MAX_STR_LEN]
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
void PAPIERROR(char *format,...)
static struct temp_event * last
#define NET_PROC_FILE
Definition: linux-net.c:44
#define NET_PROC_MAX_LINE
Definition: linux-net.c:49
#define NET_INTERFACE_COUNTERS
Definition: linux-net.c:71
static struct temp_event * root
Definition: linux-net.c:68
int temp
Definition: iozone.c:22158
char * description
Definition: linux-net.c:75
long j
Definition: iozone.c:19135
ssize_t retval
Definition: libasync.c:338

Here is the call graph for this function:

Here is the caller graph for this function:

static int getInterfaceBaseIndex ( const char *  ifname)
static

Definition at line 185 of file linux-net.c.

186 {
187  int i;
188 
189  for ( i=0; i<num_events; i+=NET_INTERFACE_COUNTERS ) {
190  if (strncmp(_net_native_events[i].name, ifname, strlen(ifname)) == 0) {
191  return i;
192  }
193  }
194 
195  return -1; /* Not found */
196 }
static int num_events
int i
Definition: fileop.c:140
static NET_native_event_entry_t * _net_native_events
Definition: linux-net.c:54
#define NET_INTERFACE_COUNTERS
Definition: linux-net.c:71
char * name
Definition: iozone.c:23648

Here is the caller graph for this function:

static int read_net_counters ( long long values)
static

Definition at line 200 of file linux-net.c.

201 {
202  FILE *fin;
203  char line[NET_PROC_MAX_LINE];
204  char *retval, *ifname, *data;
205  int i, nf, if_bidx;
206 
207  fin = fopen(NET_PROC_FILE, "r");
208  if (fin == NULL) {
209  SUBDBG("Can't find %s, are you sure the /proc file-system is mounted?\n",
210  NET_PROC_FILE);
211  return NET_INVALID_RESULT;
212  }
213 
214  /* skip the 2 header lines */
215  for (i=0; i<2; i++) {
216  retval = fgets (line, NET_PROC_MAX_LINE, fin);
217  if (retval == NULL) {
218  SUBDBG("Not enough lines in %s\n", NET_PROC_FILE);
219  fclose(fin);
220  return 0;
221  }
222  }
223 
224  while ((fgets (line, NET_PROC_MAX_LINE, fin)) == line) {
225 
226  /* split the interface name from its 16 counters */
227  retval = strstr(line, ":");
228  if (retval == NULL) {
229  SUBDBG("Wrong line format <%s>\n", line);
230  continue;
231  }
232 
233  *retval = '\0';
234  data = retval + 1;
235  ifname = line;
236  while (isspace(*ifname)) { ifname++; }
237 
238  if_bidx = getInterfaceBaseIndex(ifname);
239  if (if_bidx < 0) {
240  SUBDBG("Interface <%s> not found\n", ifname);
241  } else {
242  nf = sscanf( data,
243  "%lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld\n",
244  &values[if_bidx + 0], &values[if_bidx + 1],
245  &values[if_bidx + 2], &values[if_bidx + 3],
246  &values[if_bidx + 4], &values[if_bidx + 5],
247  &values[if_bidx + 6], &values[if_bidx + 7],
248  &values[if_bidx + 8], &values[if_bidx + 9],
249  &values[if_bidx + 10], &values[if_bidx + 11],
250  &values[if_bidx + 12], &values[if_bidx + 13],
251  &values[if_bidx + 14], &values[if_bidx + 15]);
252 
253  SUBDBG("\nRead "
254  "%lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld %lld\n",
255  values[if_bidx + 0], values[if_bidx + 1],
256  values[if_bidx + 2], values[if_bidx + 3],
257  values[if_bidx + 4], values[if_bidx + 5],
258  values[if_bidx + 6], values[if_bidx + 7],
259  values[if_bidx + 8], values[if_bidx + 9],
260  values[if_bidx + 10], values[if_bidx + 11],
261  values[if_bidx + 12], values[if_bidx + 13],
262  values[if_bidx + 14], values[if_bidx + 15]);
263 
264  if ( nf != NET_INTERFACE_COUNTERS ) {
265  /* This shouldn't happen */
266  SUBDBG("/proc line with wrong number of fields\n");
267  }
268  }
269 
270  }
271 
272  fclose(fin);
273 
274  return 0;
275 }
fclose(thread_wqfd)
#define NET_INVALID_RESULT
Definition: linux-net.c:51
int i
Definition: fileop.c:140
#define SUBDBG(format, args...)
Definition: papi_debug.h:63
#define NET_PROC_FILE
Definition: linux-net.c:44
#define NET_PROC_MAX_LINE
Definition: linux-net.c:49
#define NET_INTERFACE_COUNTERS
Definition: linux-net.c:71
sscanf(mnc->m_child_port,"%d",&mc.m_child_port)
static int getInterfaceBaseIndex(const char *ifname)
Definition: linux-net.c:185
static long long values[NUM_EVENTS]
Definition: init_fini.c:10
ssize_t retval
Definition: libasync.c:338

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

struct net_counters _net_counter_info[NET_INTERFACE_COUNTERS]
static
Initial value:
= {
{ "rx:bytes", "receive bytes"},
{ "rx:packets", "receive packets"},
{ "rx:errors", "receive errors"},
{ "rx:dropped", "receive dropped"},
{ "rx:fifo", "receive fifo"},
{ "rx:frame", "receive frame"},
{ "rx:compressed", "receive compressed"},
{ "rx:multicast", "receive multicast"},
{ "tx:bytes", "transmit bytes"},
{ "tx:packets", "transmit packets"},
{ "tx:errors", "transmit errors"},
{ "tx:dropped", "transmit dropped"},
{ "tx:fifo", "transmit fifo"},
{ "tx:colls", "transmit colls"},
{ "tx:carrier", "transmit carrier"},
{ "tx:compressed", "transmit compressed"},
}
NET_native_event_entry_t* _net_native_events
static

Definition at line 54 of file linux-net.c.

long long _net_register_current[NET_MAX_COUNTERS]
static

Definition at line 60 of file linux-net.c.

long long _net_register_start[NET_MAX_COUNTERS]
static

Definition at line 59 of file linux-net.c.

papi_vector_t _net_vector

Definition at line 35 of file linux-net.c.

int is_initialized = 0
static

Definition at line 57 of file linux-net.c.

int num_events = 0
static

Definition at line 56 of file linux-net.c.

struct temp_event* root = NULL
static

Definition at line 68 of file linux-net.c.