|
Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
|
DnsServerProcess is the process that stores DNS records and resolves domain names and hostnames into IP addresses. More...
Public Member Functions | |
| bool | addIpAddress (string, ip) |
| Adds a DNS record with the specified hostname and IP address. More... | |
| void | removeIpAddress (string) |
| Removes the DNS record with the associated hostname. More... | |
| pair< string, ip > | getEntryAt (int) |
| int | getEntryCount () |
| Returns the number of DNS records. More... | |
| bool | isValidName (string) |
| Returns true if the specified hostname is a valid name (non-special characters), otherwise false. More... | |
| void | setEnable (bool) |
| Enables or disables the DNS server process. More... | |
| bool | isEnabled () |
| Returns true if the DNS server process is enabled, otherwise false. More... | |
| void | setPortNumber (int) |
| Sets the port number of the DNS service. More... | |
| int | getPortNumber () |
| Returns the port number of the DNS service. More... | |
| bool | isDomainNameExisted (string) |
| Returns true if the specified domain name exists, otherwise false. More... | |
| ip | getIpAddOfDomain (string) |
| Returns the IP address of the specified domain name. More... | |
| DnsRrA | getARecordWithAddress (string, ip) |
| Returns the A resource record with the specified parameters. More... | |
| DnsRrCname | getCNameRecordWithHostname (string, string) |
| Returns the CNAME resource record with the specified parameters. More... | |
| DnsRrSoa | getSOARecordWithMailbox (string, string) |
| Returns the SOA resource record with the specified parameters. More... | |
| DnsRrNs | getNSRecordWithServerName (string, string) |
| Returns the NS resource record with the specified parameters. More... | |
| bool | addARecordToNameServerDb (string, string) |
| Returns true if the A resource record was added successfully, otherwise false. More... | |
| bool | addCNAMEToNameServerDb (string, string) |
| Returns true if the CNAME resource record was added successfully, otherwise false. More... | |
| bool | addSOAToNameServerDb (string, string, string, string, string, string, string) |
| Returns true if the SOA resource record was added successfully, otherwise false. More... | |
| bool | addNSRecordToNameServerDb (string, string) |
| Returns true if the NS resource record was added successfully, otherwise false. More... | |
| bool | removeARecordFromNameServerDb (string, string) |
| Returns true if the specified A resource record was removed successfully, otherwise false. More... | |
| bool | removeCNAMEFromNameServerDb (string, string) |
| Returns true if the specified CNAME resource record was removed successfully, otherwise false. More... | |
| bool | removeSOAFromNameServerDb (string, string) |
| Returns true if the specified SOA resource record was removed successfully, otherwise false. More... | |
| bool | removeNSRecordFromNameServerDb (string, string) |
| Returns true if the specified NS resource record was removed successfully, otherwise false. More... | |
| int | getSizeOfNameServerDb () |
| Returns the size of the name server database. More... | |
| DnsResourceRecord | getRrFromNameServerDbAt (int) |
| Returns the resource record at the specified index. More... | |
| vector< DnsResourceRecord > | getMatchingRRsFromCache (string) |
| Returns the resource record associated with the resource record name. More... | |
Public Member Functions inherited from Process | |
| Device | getOwnerDevice () |
| Returns the device for this process. More... | |
DnsServerProcess is the process that stores DNS records and resolves domain names and hostnames into IP addresses.
| bool DnsServerProcess::addARecordToNameServerDb | ( | string | , |
| string | |||
| ) |
Returns true if the A resource record was added successfully, otherwise false.
| domainName,the | domain name for the A resource record. |
| address,the | address for the A resource record. |
| bool DnsServerProcess::addCNAMEToNameServerDb | ( | string | , |
| string | |||
| ) |
Returns true if the CNAME resource record was added successfully, otherwise false.
| domainName,the | domain name for the CNAME resource record. |
| hostName,the | hostname for the CNAME resource record. |
| bool DnsServerProcess::addIpAddress | ( | string | , |
| ip | |||
| ) |
Adds a DNS record with the specified hostname and IP address.
| hostname,the | hostname of the DNS record. |
| ipAddress,the | IP address of the DNS record. |
| bool DnsServerProcess::addNSRecordToNameServerDb | ( | string | , |
| string | |||
| ) |
Returns true if the NS resource record was added successfully, otherwise false.
| domainName,the | domain name for the NS resource record. |
| serverName,the | server name for the NS resource record. |
| bool DnsServerProcess::addSOAToNameServerDb | ( | string | , |
| string | , | ||
| string | , | ||
| string | , | ||
| string | , | ||
| string | , | ||
| string | |||
| ) |
Returns true if the SOA resource record was added successfully, otherwise false.
| domainName,the | domain name for the SOA resource record. |
| serverName,the | primary server name for the SOA resource record. |
| mailbox,the | mailbox for the SOA resource record. |
| minTtl,the | minimum TTL for the SOA resource record. |
| refresh,the | refresh time for the SOA resource record. |
| retry,the | retry time for the SOA resource record. |
| expiry,the | expiry time for the SOA resource record. |
| DnsRrA DnsServerProcess::getARecordWithAddress | ( | string | , |
| ip | |||
| ) |
Returns the A resource record with the specified parameters.
| domainName,the | domain name of the A resource record of interest. |
| address,the | address of the A resource record of interest. |
| DnsRrCname DnsServerProcess::getCNameRecordWithHostname | ( | string | , |
| string | |||
| ) |
Returns the CNAME resource record with the specified parameters.
| domainName,the | domain name of the CNAME resource record of interest. |
| hostName,the | hostname of the CNAME resource record of interest. |
| pair< string, ip > DnsServerProcess::getEntryAt | ( | int | ) |
\Returns the hostname and IP address of the DNS record at the specified index.
| index,the | DNS record index of interest. |
| int DnsServerProcess::getEntryCount | ( | ) |
Returns the number of DNS records.
| ip DnsServerProcess::getIpAddOfDomain | ( | string | ) |
Returns the IP address of the specified domain name.
| domainName,the | domain name of interest. |
| vector< DnsResourceRecord > DnsServerProcess::getMatchingRRsFromCache | ( | string | ) |
Returns the resource record associated with the resource record name.
| name,the | name of the resource record of interest. |
| DnsRrNs DnsServerProcess::getNSRecordWithServerName | ( | string | , |
| string | |||
| ) |
Returns the NS resource record with the specified parameters.
| domainName,the | domain name of the NS resource record of interest. |
| serverName,the | server name of the NS resource record of interest. |
| int DnsServerProcess::getPortNumber | ( | ) |
Returns the port number of the DNS service.
| DnsResourceRecord DnsServerProcess::getRrFromNameServerDbAt | ( | int | ) |
Returns the resource record at the specified index.
| index,the | index of the resource record of interest. |
| int DnsServerProcess::getSizeOfNameServerDb | ( | ) |
Returns the size of the name server database.
| DnsRrSoa DnsServerProcess::getSOARecordWithMailbox | ( | string | , |
| string | |||
| ) |
Returns the SOA resource record with the specified parameters.
| domainName,the | domain name of the SOA resource record of interest. |
| mailbox,the | mailbox of the SOA resource record of interest. |
| bool DnsServerProcess::isDomainNameExisted | ( | string | ) |
Returns true if the specified domain name exists, otherwise false.
| domainName,the | domain name of interest. |
| bool DnsServerProcess::isEnabled | ( | ) |
Returns true if the DNS server process is enabled, otherwise false.
| bool DnsServerProcess::isValidName | ( | string | ) |
Returns true if the specified hostname is a valid name (non-special characters), otherwise false.
| hostname,the | hostname of interest. |
| bool DnsServerProcess::removeARecordFromNameServerDb | ( | string | , |
| string | |||
| ) |
Returns true if the specified A resource record was removed successfully, otherwise false.
| domainName,the | domain name of the A resource record of interest. |
| address,the | address of the A resource record of interest. |
| bool DnsServerProcess::removeCNAMEFromNameServerDb | ( | string | , |
| string | |||
| ) |
Returns true if the specified CNAME resource record was removed successfully, otherwise false.
| domainName,the | domain name of the CNAME resource record of interest. |
| hostName,the | hostname of the CNAME resource record of interest. |
| void DnsServerProcess::removeIpAddress | ( | string | ) |
Removes the DNS record with the associated hostname.
| hostname,the | hostname of the DNS record of interest. |
| bool DnsServerProcess::removeNSRecordFromNameServerDb | ( | string | , |
| string | |||
| ) |
Returns true if the specified NS resource record was removed successfully, otherwise false.
| domainName,the | domain name of the NS resource record of interest. |
| serverName,the | server name of the NS resource record of interest. |
| bool DnsServerProcess::removeSOAFromNameServerDb | ( | string | , |
| string | |||
| ) |
Returns true if the specified SOA resource record was removed successfully, otherwise false.
| domainName,the | domain name of the SOA resource record of interest. |
| mailbox,the | mailbox of the SOA resource record of interest. |
| void DnsServerProcess::setEnable | ( | bool | ) |
Enables or disables the DNS server process.
| bEnable,true | to enable the DNS server process, false to disable it. |
| void DnsServerProcess::setPortNumber | ( | int | ) |
Sets the port number of the DNS service.
| num,the | port number to set the DNS service to. |