Description
The Computer Address
macro is used to insert IP and MAC addresses into strings generated with the Custom String generator.
The macro is an analog of the Computer Address data generator.
Syntax
The macro has the following syntax:
%COMP(AddressFormat, *xN)
Parameters
AddressFormat
Specifies the format of generated data. The parameter can have one of the following values:
Value | Description |
---|---|
IPv4 |
Default. Generates IP addresses, for example – 131.88.16.212 |
MAC48 |
Generates MAC addresses, for example – 77:D6:85:8A:69:74 |
The values are case-insensitive.
If you specify any other value, the macro will use the default value (IPv4
).
*xN
Optional parameter. Specifies the number of possible repetitions of each value in series of generated strings. N is a positive number that specifies the number of repetitions: 1, 2, 3, and so on. The default parameter value is *x1
(no repetitions).
Examples
The following examples demonstrate how to use the Computer Address
macro:
-
%COMP(IPv4)
Generates IP addresses.
-
%COMP(IPv4, *x2)
Generates IP addresses and repeats each generated address twice in the sequence of generated custom strings.
-
%COMP(mac48)
Generates MAC addresses (parameter values are case-insensitive).
-
%COMP(IPv6) <— Invalid value
This value is not supported. The macro will use the default value,
IPv4
, and generate IP addresses.
Remarks
-
For more information on adding macros to custom strings, see About Custom String Generator
-
For more information on general rules used for specifying macro parameters, see Custom String Generator Rules .
See Also
Macro Reference
Custom String Generator Rules
Custom String Generator
Computer Address Generator
Using Data Generators
Generating Values