Module interface

[frames] | no frames]

# Module interface

Module that exposes functions to get information on the current interfaces enabled in ntop.

Functions

numInterfaces() Get number of configured interfaces |

String @return the name of the interface

name() Get interface name |

String @return the unique name of the interface

uniqueName() Get unique interface name |

String @return the human-friendly name of the interface

humanName() Get human-friendly interface name |

string

ipv4(interfaceId) Get interface address (IPv4) |

string

network(interfaceId) Get network and mask to which the interface belongs |

number

numHosts(interfaceId) Get the number of hosts active on this interface |

string

ipv6(interfaceId) Get interface address (IPv6) |

dictionary @return {'startTime':number, 'firstSeen': number, 'lastSeen': number}

time(interfaceId) Get interface time |

virtual() Check if this is a virtual interface |

speed() Interface speed (0 if unknown) |

mtu() Get interface MTU size |

bpf() Get BPF filter set for this interface (if any) |

pktsStats() Get packet statistics |

fcPktsStats() Get FC pkts stats |

fcBytesStats() Get FC byte stats |

bytesStats() Get bytes statistics |

throughputStats() |

tcpStats() Get TCP stats |

udpStats() Get UDP stats |

icmpStats() Get ICMP stats |

ipStats() Get IP stats |

securityPkts() Get information about security packets |

netflowStats() Get NetFlow interface information |

sflowStats() Get sFlow interface information |

cpacketStats() Get cPacket counter information |

Variables
| __package__ = `None`

Function Details

### ipv4(interfaceId)

Get interface address (IPv4)

Parameters:
  - `interfaceId` (int) - the id number for the specified interface
Returns: string
  the ipv4 address of the interfeceId passed. Empty string if none. Null if no interface passed

### network(interfaceId)

Get network and mask to which the interface belongs

Parameters:
  - `interfaceId` (int) - the id number for the specified interface
Returns: string
  the network and the network mask for the specified interfaceId

### numHosts(interfaceId)

Get the number of hosts active on this interface

Parameters:
  - `interfaceId` (int) - the id number for the specified interface
Returns: number
  the number of hosts for the specified interfaceId

### ipv6(interfaceId)

Get interface address (IPv6)

Parameters:
  - `interfaceId` (int) - the id number for the specified interface
Returns: string
  the ipv6 address of the interfeceId passed. Empty string if none. Null if no interface passed

### time(interfaceId)

Get interface time

Parameters:
  - `interfaceId` (int) - the id number for the specified interface
Returns: dictionary @return {'startTime':number, 'firstSeen': number, 'lastSeen': number}