{
    "content": [
        {
            "type": "text",
            "text": "# sg_referrals(8) (man)\n\n**Summary:** sgreferrals - send SCSI REPORT REFERRALS command\n\n**Synopsis:** sgreferrals [--help] [--hex] [--lba=LBA] [--maxlen=LEN] [--one-segment] [--raw] [--readonly]\n[--verbose] [--version] DEVICE\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -h | --help | — | output the usage message then exit. |\n| -H | --hex | — | output response to this command in ASCII hex. |\n| -l | --lba | — | where LBA is the Logical Block Address (LBA) in the first user data segment the DEVICE should report the referrals param |\n| -m | --maxlen | — | where LEN is the (maximum) response length in bytes. It is placed in the cdb's \"allo‐ cation length\" field. If not given |\n| -s | --one-segment | — | report the user data segment of the segment spefified by the LBA parameter only. |\n| -r | --raw | — | output response in binary (to stdout). |\n| -R | --readonly | — | open the DEVICE read-only (e.g. in Unix with the ORDONLY flag). The default is to open it read-write. |\n| -v | --verbose | — | increase the level of verbosity, (i.e. debug output). Additional output caused by this option is sent to stderr. |\n| -V | --version | — | print the version string and then exit. |\n\n## See Also\n\n- sgvpd(8)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (3 lines)\n- **DESCRIPTION** (7 lines)\n- **OPTIONS** (2 lines) — 9 subsections\n  - -h --help (2 lines)\n  - -H --hex (2 lines)\n  - -l --lba (3 lines)\n  - -m --maxlen (4 lines)\n  - -s --one-segment (2 lines)\n  - -r --raw (2 lines)\n  - -R --readonly (3 lines)\n  - -v --verbose (3 lines)\n  - -V --version (2 lines)\n- **NOTES** (3 lines)\n- **EXIT STATUS** (3 lines)\n- **AUTHORS** (2 lines)\n- **REPORTING BUGS** (2 lines)\n- **COPYRIGHT** (4 lines)\n- **SEE ALSO** (5 lines)\n\n## Full Content\n\n### NAME\n\nsgreferrals - send SCSI REPORT REFERRALS command\n\n### SYNOPSIS\n\nsgreferrals [--help] [--hex] [--lba=LBA] [--maxlen=LEN] [--one-segment] [--raw] [--readonly]\n[--verbose] [--version] DEVICE\n\n### DESCRIPTION\n\nSend the SCSI REPORT REFERRALS command to the DEVICE and outputs the response.  This  command\nwas introduced in (draft) SBC-3 revision 24 and devices that support referrals should support\nthis command.\n\nThe default action is to decode the response for all user data segment referral  descriptors.\nThe amount of output can be reduced by the --lba and --one-segment options.\n\n### OPTIONS\n\nArguments to long options are mandatory for short options as well.\n\n#### -h --help\n\noutput the usage message then exit.\n\n#### -H --hex\n\noutput response to this command in ASCII hex.\n\n#### -l --lba\n\nwhere LBA is the Logical Block Address (LBA) in the first user data segment the DEVICE\nshould report the referrals parameter data for.\n\n#### -m --maxlen\n\nwhere LEN is the (maximum) response length in bytes. It is placed in the cdb's  \"allo‐\ncation  length\"  field. If not given then 256 is used. 256 is enough space for the re‐\nsponse header and user data segment descriptors.\n\n#### -s --one-segment\n\nreport the user data segment of the segment spefified by the LBA parameter only.\n\n#### -r --raw\n\noutput response in binary (to stdout).\n\n#### -R --readonly\n\nopen the DEVICE read-only (e.g. in Unix with the ORDONLY flag).  The  default  is  to\nopen it read-write.\n\n#### -v --verbose\n\nincrease the level of verbosity, (i.e. debug output). Additional output caused by this\noption is sent to stderr.\n\n#### -V --version\n\nprint the version string and then exit.\n\n### NOTES\n\nFor a discussion of referrals see section 4.25 of sbc3r25.pdf at http://www.t10.org  (or  the\ncorresponding section of a later draft).\n\n### EXIT STATUS\n\nThe  exit  status  of sgreferrals is 0 when it is successful. Otherwise see the sg3utils(8)\nman page.\n\n### AUTHORS\n\nWritten by Douglas Gilbert and Hannes Reinecke.\n\n### REPORTING BUGS\n\nReport bugs to <dgilbert at interlog dot com>.\n\n### COPYRIGHT\n\nCopyright © 2009-2014 Douglas Gilbert and Hannes Reinecke\nThis software is distributed under a FreeBSD license. There is NO warranty; not even for MER‐\nCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n### SEE ALSO\n\nsgvpd(8)\n\n\n\nsg3utils-1.39                                May 2014                               SGREFERRALS(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "sg_referrals",
        "section": "8",
        "mode": "man",
        "summary": "sgreferrals - send SCSI REPORT REFERRALS command",
        "synopsis": "sgreferrals [--help] [--hex] [--lba=LBA] [--maxlen=LEN] [--one-segment] [--raw] [--readonly]\n[--verbose] [--version] DEVICE",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "output the usage message then exit."
            },
            {
                "flag": "-H",
                "long": "--hex",
                "arg": null,
                "description": "output response to this command in ASCII hex."
            },
            {
                "flag": "-l",
                "long": "--lba",
                "arg": null,
                "description": "where LBA is the Logical Block Address (LBA) in the first user data segment the DEVICE should report the referrals parameter data for."
            },
            {
                "flag": "-m",
                "long": "--maxlen",
                "arg": null,
                "description": "where LEN is the (maximum) response length in bytes. It is placed in the cdb's \"allo‐ cation length\" field. If not given then 256 is used. 256 is enough space for the re‐ sponse header and user data segment descriptors."
            },
            {
                "flag": "-s",
                "long": "--one-segment",
                "arg": null,
                "description": "report the user data segment of the segment spefified by the LBA parameter only."
            },
            {
                "flag": "-r",
                "long": "--raw",
                "arg": null,
                "description": "output response in binary (to stdout)."
            },
            {
                "flag": "-R",
                "long": "--readonly",
                "arg": null,
                "description": "open the DEVICE read-only (e.g. in Unix with the ORDONLY flag). The default is to open it read-write."
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "increase the level of verbosity, (i.e. debug output). Additional output caused by this option is sent to stderr."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "print the version string and then exit."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "sgvpd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/sgvpd/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-H --hex",
                        "lines": 2,
                        "flag": "-H",
                        "long": "--hex"
                    },
                    {
                        "name": "-l --lba",
                        "lines": 3,
                        "flag": "-l",
                        "long": "--lba"
                    },
                    {
                        "name": "-m --maxlen",
                        "lines": 4,
                        "flag": "-m",
                        "long": "--maxlen"
                    },
                    {
                        "name": "-s --one-segment",
                        "lines": 2,
                        "flag": "-s",
                        "long": "--one-segment"
                    },
                    {
                        "name": "-r --raw",
                        "lines": 2,
                        "flag": "-r",
                        "long": "--raw"
                    },
                    {
                        "name": "-R --readonly",
                        "lines": 3,
                        "flag": "-R",
                        "long": "--readonly"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 3,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-V --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "NOTES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "EXIT STATUS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}