fprintf(stderr, "where OPTS := [ pn <u32> ] [ on | off ]\n");
fprintf(stderr, " ID := 128-bit hex string\n");
fprintf(stderr, " KEY := 128-bit hex string\n");
- fprintf(stderr, " SCI := { sci <u64> | port <u16> address <lladdr> }\n");
+ fprintf(stderr, " SCI := { sci <u64> | port { 1..2^16-1 } address <lladdr> }\n");
exit(-1);
}
static int get_port(__be16 *port, const char *arg)
{
- return get_be16(port, arg, 10);
+ return get_be16(port, arg, 0);
}
#define _STR(a) #a
static void usage(FILE *f)
{
fprintf(f,
- "Usage: ... macsec [ port PORT | sci SCI ]\n"
+ "Usage: ... macsec [ [ address <lladdr> ] port { 1..2^16-1 } | sci <u64> ]\n"
" [ cipher { default | gcm-aes-128 } ]\n"
" [ icvlen { 8..16 } ]\n"
" [ encrypt { on | off } ]\n"
the following additional arguments are supported:
.BI "ip link add link " DEVICE " name " NAME " type macsec"
-[
+[ [
+.BI address " <lladdr>"
+]
.BI port " PORT"
|
.BI sci " SCI"
.in +8
.sp
-.BI port " PORT "
-- sets the port number for this MACsec device.
+.BI address " <lladdr> "
+- sets the system identifier component of secure channel for this MACsec device.
+
+.sp
+.BI port " PORT "
+- sets the port number component of secure channel for this MACsec device, in a
+range from 1 to 65535 inclusive. Numbers with a leading " 0 " or " 0x " are
+interpreted as octal and hexadecimal, respectively.
.sp
.BI sci " SCI "
ip-macsec \- MACsec device configuration
.SH "SYNOPSIS"
.BI "ip link add link " DEVICE " name " NAME " type macsec "
-[
+[ [
+.BI address " <lladdr>"
+]
.BI port " PORT"
|
-.BI sci " SCI"
+.BI sci " <u64>"
] [
.BR cipher " { " default " | " gcm-aes-128 " } ] ["
.BI icvlen " ICVLEN"
.IR SCI " := { "
.B sci
.IR <u64> " | "
-.BI port " <u16> " address " <lladdr> "
+.BI port
+.IR PORT
+.BI address " <lladdr> "
}
+.br
+.IR PORT " := { " 1..2^16-1 " } "
.SH DESCRIPTION