]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - usr.sbin/lmcconfig/lmcconfig.8
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / usr.sbin / lmcconfig / lmcconfig.8
1 .\" Copyright (c) 2003 David Boggs. (boggs@boggs.palo-alto.ca.us)
2 .\" All rights reserved.
3 .\"
4 .\" BSD License:
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\"
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 .\" SUCH DAMAGE.
26 .\"
27 .\" GNU General Public License:
28 .\"
29 .\" This program is free software; you can redistribute it and/or modify it 
30 .\" under the terms of the GNU General Public License as published by the Free 
31 .\" Software Foundation; either version 2 of the License, or (at your option) 
32 .\" any later version.
33 .\" 
34 .\" This program is distributed in the hope that it will be useful, but WITHOUT 
35 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
36 .\" FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
37 .\" more details.
38 .\"
39 .\" You should have received a copy of the GNU General Public License along with
40 .\" this program; if not, write to the Free Software Foundation, Inc., 59 
41 .\" Temple Place - Suite 330, Boston, MA  02111-1307, USA.
42 .\"
43 .\" $FreeBSD$
44 .\"
45 .Dd October 3, 2005
46 .Dt LMCCONFIG 8
47 .Os
48 .Sh NAME
49 .Nm lmcconfig
50 .Nd configuration program for
51 .Tn SBE
52 (formerly
53 .Tn LMC )
54 wide-area network interface cards
55 .Sh SYNOPSIS
56 .Nm
57 .Ar interface
58 .Op Fl abBcCdDeEfhLmMpPrsStTuwxXyYzZ?
59 .Nm
60 .Ar interface
61 .Fl 1
62 .Op Fl aABceEfFgiIlLpPstTuUxX
63 .Nm
64 .Ar interface
65 .Fl 3
66 .Op Fl aABcefFlLsSv
67 .Sh DESCRIPTION
68 The
69 .Nm
70 utility
71 is the configuration program for the
72 .Xr lmc 4
73 wide-area network device driver.
74 It sets control values, such as T3 framing format,
75 and it displays status, such as that of integrated modems,
76 that are beyond the scope of
77 .Xr ifconfig 8 .
78 .Pp
79 The
80 .Nm
81 utility
82 displays the interface status when no parameters are specified;
83 see example below.
84 For this case only, if no
85 .Ar interface
86 is specified, it defaults to
87 .Dq Li lmc0 .
88 .Pp
89 Only the super-user may modify the configuration of a network interface.
90 .Pp
91 The following options are available:
92 .Bl -tag -width indent
93 .It Ar interface
94 This is the name of the interface; the default is
95 .Dq Li lmc0 .
96 If
97 .Xr netgraph 4
98 is present and the interface name ends with a colon
99 then Netgraph control messages are used,
100 otherwise the
101 .Xr ifnet 9
102 kernel interface and socket
103 .Xr ioctl 2
104 system calls are used.
105 .It Fl 1
106 All parameters after this apply to the T1E1 card.
107 .It Fl 3
108 All parameters after this apply to the T3 card.
109 .El
110 .Ss Commands for all cards
111 The following parameters apply to more than one card type.
112 .Bl -tag -width indent
113 .It Fl a Ar number
114 Set Transmitter clock source to
115 .Ar number .
116 .Pp
117 .Bl -column "1" "External connector" "T1E1, HSSIc" -offset 2m -compact
118 .It "1" Ta "TxClk from modem"   Ta "T1E1, HSSI"  Ta "default"
119 .It "2" Ta "Internal source"    Ta "T1E1, HSSI"
120 .It "3" Ta "RxClk from modem"   Ta "T1E1, HSSIc" Ta "loop timed"
121 .It "4" Ta "External connector" Ta "T1E1, HSSIc"
122 .El
123 .Pp
124 An HSSI card normally takes its Tx clock from the modem connector
125 (it is a DTE) but can use the PCI bus clock (typically 33 MHz)
126 for loopback and null modem testing; values 3 and 4 are only
127 applicable to a few rare CompactPCI/HSSI cards.
128 .Pp
129 A T1E1 card uses an on-board synthesized oscillator
130 if the value is 1 or 2; it
131 .Em loop times
132 (uses the clock recovered by the receiver as the transmitter clock)
133 if the value is 3; and it uses a clock from a header connector on
134 the card if the value is 4.
135 .Pp
136 TxClk source is not applicable to other card types.
137 .It Fl b
138 Read BIOS ROM.
139 Print the first 256 locations.
140 The BIOS ROM is not used and not present on some cards.
141 .It Fl B
142 Write BIOS ROM.
143 Write the first 256 locations with an address pattern.
144 .It Fl c
145 Use HDLC's 16-bit CRC polynomial: X^16+X^12+X^5+1 (default).
146 .It Fl C
147 Use HDLC's 32-bit CRC polynomial:
148 X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X+1
149 .It Fl d
150 Clear the driver-level debug flag.
151 Non-critical log messages are suppressed.
152 .It Fl D
153 Set the driver-level debug flag.
154 The driver generates more log messages.
155 The driver also generates more log messages if the interface-level debug
156 flag is set by
157 .Xr ifconfig 8 .
158 .It Fl e
159 Set DTE (Data Terminal Equipment) mode (default).
160 An SSI card transmitter uses the Tx clock signal from the modem connector
161 and receives the Data Carrier Detect pin (DCD).
162 DTE/DCE is not applicable to other card types except
163 a few rare CompactPCI/HSSI cards.
164 .It Fl E
165 Set DCE (Data Communication Equipment) mode.
166 An SSI card transmitter uses an on-board synthesized oscillator
167 and drives the Data Carrier Detect pin (DCD).
168 .It Fl f Ar number
169 Set the frequency of the built-in synthesized oscillator to
170 .Ar number
171 bits/second.
172 The nearest frequency that the synthesizer can generate will be used.
173 Only SSI cards and a few rare CompactPCI/HSSI cards have synthesizers.
174 .It Fl F
175 Set SPPP line protocol to Frame-Relay.
176 Only works for
177 .Fx 5.4
178 and later.
179 .It Fl h
180 Print help (usage message).
181 .It Fl i
182 Set interface name (e.g.\&
183 .Dq Li lmc0 ) .
184 .It Fl L Ar number
185 Set loopback mode to
186 .Ar number .
187 .Pp
188 .Bl -column "99" "payload" "inward thru drvrs/rcvrsxxx" "HSSI, SSI" -offset 1m -compact 
189 .It  "1" Ta "none"    Ta "default"                 Ta \&
190 .It  "2" Ta "payload" Ta "outward thru framer"     Ta "T1E1. T3"
191 .It  "3" Ta "line"    Ta "outward thru line if"    Ta "T1E1, T3, HSSIc"
192 .It  "4" Ta "other"   Ta "inward thru line if"     Ta "T1E1, T3"
193 .It  "5" Ta "inward"  Ta "inward thru framer"      Ta "T1E1, T3"
194 .It  "6" Ta "dual"    Ta "inward and outward"      Ta "T1E1, T3"
195 .It "16" Ta "tulip"   Ta "inward thru Tulip chip"  Ta "all cards"
196 .It "17" Ta "pins"    Ta "inward thru drvrs/rcvrs" Ta "SSI"
197 .It "18" Ta "LA/LL"   Ta "assert LA/LL modem pin"  Ta "HSSI, SSI"
198 .It "19" Ta "LB/RL"   Ta "assert LB/RL modem pin"  Ta "HSSI, SSI"
199 .El
200 .It Fl m
201 Read Tulip MII registers.
202 Print the 32 16-bit registers in the Media Independent Interface.
203 .It Fl M Ar addr Ar data
204 Write Tulip MII register.
205 Write
206 .Ar data
207 into register
208 .Ar addr .
209 .It Fl p
210 Read Tulip PCI configuration registers.
211 Print the first 16 32-bit registers in the PCI configuration space.
212 .It Fl P Ar addr Ar data
213 Write Tulip PCI configuration register.
214 Write
215 .Ar data
216 into register
217 .Ar addr .
218 .It Fl s
219 Read Tulip SROM.
220 Print the 64 16-bit locations.
221 The PCI subsystem vendor and device IDs are kept here.
222 .It Fl S Ar number
223 Write Tulip SROM.
224 Initializes the Tulip SROM to card type
225 .Ar number .
226 .Pp
227 .Bl -column "9" -offset 1m -compact
228 .It 3 Ta HSSI
229 .It 4 Ta T3
230 .It 5 Ta SSI
231 .It 6 Ta T1E1
232 .It 7 Ta HSSIc
233 .It 8 Ta SDSL
234 .It 0 Ta auto-set from MII PHYID
235 .El
236 .Pp
237 If
238 .Ar number
239 is zero, then the card type is computed from the gate array
240 microcode version field in the MII PHYID register.
241 .Em CAUTION :
242 if the SROM is incorrect, the card will be unusable!
243 This command is
244 .Em so
245 dangerous that
246 .Nm
247 must be edited and recompiled to enable it.
248 .It Fl t
249 Read Tulip CSRs.
250 Print the 16 32-bit control and status registers.
251 .It Fl T Ar addr Ar data
252 Write Tulip CSR.
253 Write
254 .Ar data
255 into CSR number
256 .Ar addr .
257 Note that
258 .Ar addr
259 is a CSR number (0-15) not a byte offset into CSR space.
260 .It Fl u
261 Reset event counters to zero.
262 The driver counts events like packets in and out, errors, discards, etc.
263 The time when the counters are reset is remembered.
264 .It Fl U
265 Reset gate array.
266 Not needed during normal operation; just for testing.
267 .It Fl v
268 Set verbose mode: print more stuff.
269 .It Fl V
270 Print the card configuration \[em] see the
271 .Sx EXAMPLES
272 section.
273 .It Fl w
274 Load gate array from on-board ROM.
275 Not needed during normal operation; just for testing.
276 .It Fl W Ar filename
277 Load gate array microcode from
278 .Ar filename .
279 .It Fl x
280 Select RAWIP mode \[em] bypass line protocol code.
281 .It Fl X
282 Select line protocol code rather than RAWIP mode.
283 .It Fl y
284 Disable SPPP keep-alive packets.
285 .It Fl Y
286 Enable SPPP keep-alive packets.
287 .It Fl z
288 Set SPPP line protocol to Cisco-HDLC.
289 .It Fl Z
290 Set SPPP line protocol to PPP.
291 .It Fl ?\&
292 Print help (usage message).
293 .El
294 .Ss Commands for T1E1 cards
295 The following parameters apply to the T1E1 card type:
296 .Bl -tag -width indent
297 .It Fl a Sm Cm y | a | b Sm
298 Stop sending alarm signal.
299 .Pp
300 .Bl -column "y" "Yellow Alarm" "unframed all ones; aka AIS" -offset 1m -compact
301 .It "y" Ta "Yellow Alarm" Ta "varies with framing"
302 .It "a" Ta "Red Alarm"    Ta "unframed all ones; aka AIS"
303 .It "b" Ta "Blue Alarm"   Ta "unframed all ones"
304 .El
305 .Pp
306 Red alarm, also known as AIS (Alarm Indication Signal),
307 and Blue alarm are identical in T1.
308 .It Fl A Sm Cm y | a | b Sm
309 Start sending alarm signal (see table above).
310 .It Fl B Ar number
311 Send a Bit Oriented Protocol (BOP) message with code
312 .Ar number .
313 BOP codes are six bits.
314 .It Fl c Ar number
315 Set cable length to
316 .Ar number
317 meters (default: 10 meters).
318 This is used to set receiver sensitivity
319 and transmitter line build-out.
320 .It Fl d
321 Print the status of the on-board DSU/CSU \[em] see the
322 .Sx EXAMPLES
323 section.
324 .It Fl e Ar number
325 Set the framing format to
326 .Ar number :
327 .Pp
328 .Bl -column "99" -offset 1m -compact
329 .It  9 Ta T1-SF/AMI
330 .It 27 Ta T1-ESF/B8ZS (default)
331 .It  0 Ta E1-FAS
332 .It  8 Ta E1-FAS+CRC
333 .It 16 Ta E1-FAS+CAS
334 .It 24 Ta E1-FAS+CRC+CAS
335 .It 32 Ta E1-NO-framing
336 .El
337 .It Fl E Ar number
338 Enable 64Kb time slots (TSs) for the T1E1 card.
339 The
340 .Ar number
341 argument
342 is a 32-bit hex number (default 0xFFFFFFFF).
343 The LSB is TS0 and the MSB is TS31.
344 TS0 and TS25-31 are ignored in T1 mode.
345 TS0 and TS16 are determined by the framing format in E1 mode.
346 .It Fl f
347 Read framer registers.
348 Print the 512 8-bit registers in the framer chip.
349 .It Fl F Ar addr Ar data
350 Write framer register.
351 Write
352 .Ar data
353 into register
354 .Ar addr .
355 .It Fl g Ar number
356 Set receiver gain range to
357 .Ar number :
358 .Pp
359 .Bl -column "0x00" "Medium" "auto-set based on cable length (default)" -offset 1m -compact 
360 .It "0x24" Ta "Short"  Ta "0 to 20 dB of equalized gain"
361 .It "0x2C" Ta "Medium" Ta "0 to 30 dB of equalized gain"
362 .It "0x34" Ta "Long"   Ta "0 to 40 dB of equalized gain"
363 .It "0x3F" Ta "Extend" Ta "0 to 64 dB of equalized gain (wide open)"
364 .It "0xFF" Ta "Auto"   Ta "auto-set based on cable length (default)"
365 .El
366 .Pp
367 This sets the level at which
368 .Em Loss-Of-Signal
369 is declared.
370 .It Fl i
371 Send a
372 .Em CSU loopback deactivate
373 inband command (T1-SF only).
374 .It Fl I
375 Send a
376 .Em CSU loopback activate
377 inband command (T1-SF only).
378 .It Fl l
379 Send a
380 .Em line loopback deactivate
381 BOP message (T1-ESF only).
382 .It Fl L
383 Send a
384 .Em line loopback activate
385 BOP message (T1-ESF only).
386 .It Fl p
387 Send a
388 .Em payload loopback deactivate
389 BOP message (T1-ESF only).
390 .It Fl P
391 Send a
392 .Em payload loopback activate
393 BOP message (T1-ESF only).
394 .It Fl s
395 Print the status of the on-board DSU/CSU \[em] see the
396 .Sx EXAMPLES
397 section.
398 .It Fl t
399 Stop sending test pattern.
400 .It Fl T Ar number
401 Start sending test pattern
402 .Ar number :
403 .Pp
404 .Bl -column "99" -offset 1m -compact
405 .It  0 Ta unframed X^11+X^9+1
406 .It  1 Ta unframed X^15+X^14+1
407 .It  2 Ta unframed X^20+X^17+1
408 .It  3 Ta unframed X^23+X^18+1
409 .It  4 Ta unframed X^11+X^9+1  with 7ZS
410 .It  5 Ta unframed X^15+X^14+1 with 7ZS
411 .It  6 Ta unframed X^20+X^17+1 with 14ZS (QRSS)
412 .It  7 Ta unframed X^23+X^18+1 with 14ZS
413 .It  8 Ta   framed X^11+X^9+1
414 .It  9 Ta   framed X^15+X^14+1
415 .It 10 Ta   framed X^20+X^17+1
416 .It 11 Ta   framed X^23+X^18+1
417 .It 12 Ta   framed X^11+X^9+1  with 7ZS
418 .It 13 Ta   framed X^15+X^14+1 with 7ZS
419 .It 14 Ta   framed X^20+X^17+1 with 14ZS (QRSS)
420 .It 15 Ta   framed X^23+X^18+1 with 14ZS
421 .El
422 .It Fl u Ar number
423 Set transmit pulse shape to
424 .Ar number :
425 .Pp
426 .Bl -column "99" -offset 1m -compact
427 .It   0 Ta T1 DSX 0 to 40 meters
428 .It   2 Ta T1 DSX 40 to 80 meters
429 .It   4 Ta T1 DSX 80 to 120 meters
430 .It   6 Ta T1 DSX 120 to 160 meters
431 .It   8 Ta T1 DSX 160 to 200 meters
432 .It  10 Ta E1 75-ohm coax pair
433 .It  12 Ta E1 120-ohm twisted pairs
434 .It  14 Ta T1 CSU 200 to 2000 meters; set LBO
435 .It 255 Ta auto-set based on cable length and framing format (default)
436 .El
437 .It Fl U Ar number
438 Set transmit line build-out to
439 .Ar number :
440 .Pp
441 .Bl -column "255" "22.5 dB" "FCC option A" -offset 1m -compact
442 .It "  0" Ta "0 dB"    Ta "FCC option A"
443 .It " 16" Ta "7.5 dB"  Ta "FCC option B"
444 .It " 32" Ta "15 dB"   Ta "FCC option C"
445 .It " 48" Ta "22.5 dB" Ta "final span"
446 .It "255" Ta "auto-set based on cable length (default)" Ta \&
447 .El
448 .Pp
449 This is only applicable if the pulse shape is T1-CSU.
450 .It Fl v
451 Set verbose mode: print more stuff.
452 .It Fl x
453 Disable transmitter outputs.
454 .It Fl X
455 Enable transmitter outputs.
456 .El
457 .Ss Commands for T3 cards
458 The following parameters apply to the T3 card type:
459 .Bl -tag -width indent
460 .It Fl a Sm Cm y | a | b | i Sm
461 Stop sending alarm signal.
462 .Pp
463 .Bl -column "y" "Yellow Alarm" "framed 1010... aka AIS" -offset 1m -compact
464 .It "y" Ta "Yellow Alarm" Ta "X-bits set to 0"
465 .It "a" Ta "Red Alarm"    Ta "framed 1010... aka AIS"
466 .It "b" Ta "Blue Alarm"   Ta "unframed all-ones"
467 .It "i" Ta "Idle signal"  Ta "framed 11001100..."
468 .El
469 .It Fl A Sm Cm y | a | b | i Sm
470 Start sending alarm signal (see table above).
471 .It Fl B Ar number
472 Send a BOP (Bit Oriented Protocol) message with code
473 .Ar number .
474 BOP codes are six bits.
475 .It Fl c Ar number
476 Set cable length to
477 .Ar number
478 meters (default: 10 meters).
479 This is used to set receiver sensitivity
480 and transmitter line build-out.
481 .It Fl d
482 Print the status of the on-board T3 DSU \[em] see the
483 .Sx EXAMPLES
484 section.
485 .It Fl e Ar number
486 Set the framing format to
487 .Ar number :
488 .Pp
489 .Bl -column "100" -offset 1m -compact
490 .It 100 Ta T3-C-bit parity
491 .It 101 Ta T3-M13 format
492 .El
493 .It Fl f
494 Read framer registers.
495 Print the 22 8-bit registers in the framer chip.
496 .It Fl F Ar addr Ar data
497 Write framer register.
498 Write
499 .Ar data
500 into register
501 .Ar addr .
502 .It Fl l
503 Send a
504 .Em line loopback deactivate
505 BOP message.
506 .It Fl L
507 Send a
508 .Em line loopback activate
509 BOP message.
510 .It Fl s
511 Print the status of the on-board T3 DSU \[em] see the
512 .Sx EXAMPLES
513 section.
514 .It Fl S Ar number
515 Set payload scrambler polynomial to
516 .Ar number :
517 .Pp
518 .Bl -column "9" -offset 1m -compact
519 .It 1 Ta payload scrambler disabled
520 .It 2 Ta X^43+1: DigitalLink and Kentrox
521 .It 3 Ta X^20+X^17+1 w/28ZS: Larscom
522 .El
523 Payload scrambler polynomials are not standardized.
524 .It Fl v
525 Set verbose mode: print more stuff.
526 .It Fl V Ar number
527 Set transmit frequency offset to
528 .Ar number .
529 Some T3 cards can offset the transmitter frequency from 44.736 MHz.
530 .Ar Number
531 is in the range (0..4095); 2048 is zero offset; step size is about 3 Hz.
532 A
533 .Ar number
534 is written to a Digital-Analog Converter (DAC) which connects
535 to a Voltage Controlled Crystal Oscillator (VCXO).
536 .El
537 .Ss Event Counters
538 The device driver counts many interesting events such as
539 packets in and out, errors and discards.
540 The table below lists the event counters and describes what they count.
541 .Bl -tag -width ".Va underruns"
542 .It Va ibytes
543 Bytes received in packets with good ending status.
544 .It Va obytes
545 Bytes transmitted.
546 .It Va ipackets
547 Packets received with good ending status.
548 .It Va opackets
549 Packets transmitted.
550 .It Va ierrors
551 Packets received with bad ending status.
552 .It Va oerrors
553 Packets transmitted with bad ending status.
554 .It Va idiscards
555 Packets received but discarded because
556 the input queue was full or the interface was down.
557 .It Va odiscards
558 Packets presented for transmission but discarded because
559 the output queue was full or the interface was down.
560 .It Va txdma
561 Packets presented for transmission but queued and retried later
562 because no DMA descriptors were available.
563 This can happen during normal operation and is not an indication of trouble.
564 .It Va fifo-overrun
565 Packets that started to arrive, but were aborted because
566 the card was unable to DMA data to memory fast enough
567 to prevent the receiver fifo from overflowing.
568 .It Va fifo-underrun
569 Packets that started to transmit but were aborted because
570 the card was unable to DMA data from the memory fast enough
571 to prevent the transmitter fifo from underflowing.
572 When this happens, the transmitter threshold is increased,
573 so that more bytes are required to be in the fifo
574 before the transmitter is started.
575 .It Va missed
576 Packets that are missed because the receiver is stopped.
577 .It Va overruns
578 Packets that are missed because the receiver
579 had no DMA descriptors available.
580 .It Va fdl_pkts
581 Packets received on the T1 Facility Data Link.
582 .It Va crc-errs
583 Cyclic Redundancy Checksum errors detected by the CRC-6 in
584 T1 Extended SuperFrames (ESF) or the CRC-4 in E1 frames.
585 .It Va lcv-errs
586 Line Coding Violation errors:
587 Alternate Mark Inversion (AMI) errors for T1-SF,
588 Bipolar 8-Zero Substitution (B8ZS) errors for T1-ESF, or
589 High Density Bipolar with 3-Zero Substitution (HDB3) errors for E1 or
590 Bipolar 3-Zero Substitution (B3ZS) errors for T3.
591 .It Va frm-errs
592 T1 or T3 bit errors in the frame alignment signal.
593 .It Va febe-errs
594 Far End Block Errors:
595 T1 or T3 bit errors detected by the device at the far end of the link.
596 .It Va par-errs
597 T3 bit errors detected by the hop-by-hop parity mechanism.
598 .It Va cpar-errs
599 T3 bit errors detected by the end-to-end parity mechanism.
600 .It Va mfrm-errs
601 T3 bit errors in the multi-frame alignment signal.
602 .El
603 .Ss Transmit Speed
604 The hardware counts transmit clocks divided by 2048.
605 The software computes
606 .Dq "Tx speed"
607 from this (see
608 .Sx EXAMPLES
609 below).
610 The transmit clock is the bit rate of the circuit divided by two if the
611 circuit is idle and divided by four if the circuit is carrying a packet.
612 So an idle circuit reports a Tx speed equal to its bit rate,
613 and a busy circuit reports a Tx speed equal to half its bit rate.
614 .Pp
615 This
616 .Dq "bit rate"
617 does not include circuit-level overhead bits
618 (such as T1 or T3 frame bits) but does include HDLC stuff bits.
619 An idle T1 circuit with a raw bit rate of 1544000 and a
620 bit-rate-minus-overhead of 1536000 will report a
621 .Dq "Tx speed"
622 of ((1536000 bitand 4095) plus or minus 4096).
623 Sometimes it will even get the correct answer of 1536000, and
624 if the link is fully loaded it will report about 768000 bits/sec.
625 .Pp
626 It is not a perfect bit rate meter (the circuit must be idle),
627 but it is a useful circuit utilization meter if you know the
628 circuit bit rate and do some arithmetic.
629 Software recalculates
630 Tx speed once a second; the measurement period has some jitter.
631 .Sh EXAMPLES
632 When
633 .Dq Li lmc0
634 is a T1E1 card,
635 .Dq Li lmcconfig lmc0
636 generates the following output:
637 .Bd -literal -offset 2m
638 Card name:              lmc0
639 Card type:              SBE/LMC T1E1 card
640 Link status:            Up
641 Tx Speed:               1548288
642 Line Prot/Pkg:          Frame-Relay/SPPP
643 SPPP Keep-alives:       OFF
644 CRC length:             16 bits
645 Loopback:               None
646 Tx Clk src:             Internal source
647 Format-Frame/Code:      T1-ESF/B8ZS
648 TimeSlot [31-0]:        0x01FFFFFE
649 Cable length:           10 meters
650 Tx pulse shape:         auto-set to T1-DSX: 0 to 40 meters
651 Rx gain max:            auto-set to 20.0 dB
652 Current time:           Thu Sep 29 21:48:51 2005
653 Cntrs reset:            Thu Sep 29 16:21:05 2005
654 RX bytes:               15053836
655 RX packets:             23271
656 TX bytes:               1732169
657 TX packets:             20526
658 Rx fdl pkts:            5443
659 .Ed
660 .Pp
661 When
662 .Dq Li lmc0
663 is a T1E1 card,
664 .Dq Li "lmcconfig lmc0 -1 -d"
665 generates the following output:
666 .Bd -literal -offset 2m
667 Format-Frame/Code:      T1-ESF/B8ZS
668 TimeSlot [31-0]:        0x01FFFFFE
669 Tx Clk src:             Internal source
670 Tx Speed:               1548288
671 Tx pulse shape:         T1-DSX: 0 to 40 meters
672 Tx outputs:             Enabled
673 Line impedance:         100 ohms
674 Max line loss:          20.0 dB
675 Cur line loss:           3.1 dB
676 Invert data:            No
677 Line    loop:           No
678 Payload loop:           No
679 Framer  loop:           No
680 Analog  loop:           No
681 Tx AIS:                 No
682 Rx AIS:                 No
683 Tx BOP RAI:             No
684 Rx BOP RAI:             No
685 Rx LOS analog:          No
686 Rx LOS digital:         No
687 Rx LOF:                 No
688 Tx QRS:                 No
689 Rx QRS:                 No
690 LCV errors:             0
691 CRC errors:             0
692 Frame errors:           0
693 Sev Err Frms:           0
694 Change of Frm align:    0
695 Loss of Frame events:   0
696 Last Tx BOP msg:        0x00 (Yellow Alarm (far end LOF))
697 Last Rx BOP msg:        0x00 (Yellow Alarm (far end LOF))
698 SNMP Near-end performance data:
699  LCV=0 LOS=0 FE=0 CRC=0 AIS=0 SEF=0 OOF=0  RAI=0
700 ANSI Far-end performance reports:
701  SEQ=1 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0
702  SEQ=0 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0
703  SEQ=3 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0
704  SEQ=2 CRC=0 SE=0 FE=0 LV=0 SL=0 LB=0
705 .Ed
706 .Sh DIAGNOSTICS
707 Messages indicating the specified interface does not exist, or
708 the user is not privileged and tried to alter an interface's configuration.
709 .Sh SEE ALSO
710 .Xr ioctl 2 ,
711 .Xr lmc 4 ,
712 .Xr netgraph 4 ,
713 .Xr ifconfig 8 ,
714 .Xr ifnet 9
715 .Pp
716 .Pa http://www.sbei.com/
717 .Sh HISTORY
718 This is a total rewrite of the program
719 .Nm lmcctl
720 by
721 .An "Andrew Stanley-Jones" .
722 .Sh AUTHORS
723 .An "David Boggs" Aq boggs@boggs.palo-alto.ca.us