I was thinking about adding text below the table instead - "When specifying
*hostname*, *IPv4-address* or *IPv6-address* in the tcp, udp, tcp6 or udp6
transports, you can also ...".  I don't want to clutter up the main
documentation with these kind-of-corner-cases.

  Bill


On Fri, Jan 25, 2019 at 3:53 AM Anders Wallin <walli...@gmail.com> wrote:

> What about something like this ( I skipped the "or")
> diff --git a/man/snmpcmd.1.def b/man/snmpcmd.1.def
> index aea3ca40a..d4f896000 100644
> --- a/man/snmpcmd.1.def
> +++ b/man/snmpcmd.1.def
> @@ -367,12 +367,12 @@ to the following table:
>  .BR "<transport-specifier>"
>  .BR "<transport-address> format"
>  .IP "udp" 28
> -hostname[:port]
> -.I or
> -IPv4-address[:port]
> +hostname[@interface[@namespace]][:port]
> +.IP "" 28
> +IPv4-address[@interface[@namespace]][:port]
>  .IP "tcp" 28
>
> which gives
>             <transport-specifier>       <transport-address> format
>
>              udp
>  hostname[@interface[@namespace]][:port]
>
>
>  IPv4-address[@interface[@namespace]][:port]
>
>
>
> ons 23 jan. 2019 kl 20:38 skrev Bill Fenner <fen...@users.sourceforge.net
> >:
>
>> My attempts at updating the man page formats really poorly in 80 columns:
>>
>>        At its simplest, the AGENT specification may consist of a  host-
>>
>>        name, or an IPv4 address in the standard "dotted quad" notation.
>>
>>        In this case, communication will be attempted using UDP/IPv4  to
>>
>>        port  161 of the given host.  Otherwise, the <transport-address>
>>
>>        part of the specification is parsed according to  the  following
>>
>>        table:
>>
>>
>>            <transport-specifier>       <transport-address> format
>>
>>
>>            udp                         hostname[@interface[@names-
>>
>>                                        pace]][:port]                 or
>>
>>                                        IPv4-address[@interface[@names-
>>
>>                                        pace]][:port]
>>
>>
>>            tcp                         hostname[@interface[@names-
>>
>>                                        pace]][:port]                 or
>>
>>                                        IPv4-address[@interface[@names-
>>
>>                                        pace]][:port]
>>
>>
>>            unix                        pathname
>>
>>
>>            ipx                         [network]:node[/port]
>>
>>
>>            aal5pvc or pvc              [interface.][VPI.]VCI
>>
>>
>>            udp6 or udpv6 or udpipv6    hostname[@interface[@names-
>>
>>                                        pace]][:port]                 or
>>
>>                                        IPv6-address[@interface[@names-
>>
>>                                        pace]]:port or
>>
>>                                         '['IPv6-address']'[@inter-
>>
>>                                        face[@namespace]][:port]
>>
>>
>>            tcp6 or tcpv6 or tcpipv6    hostname[@interface[@names-
>>
>>                                        pace]][:port]                 or
>>
>>                                        IPv6-address[@interface[@names-
>>
>>                                        pace]]:port or
>>
>>                                         '['IPv6-address']'[@inter-
>>
>>                                        face[@namespace]][:port]
>>
>> ...
>>
>>        udp:hostname            identical to the previous specification.
>>
>>                                The   "udp:"  is  redundant  here  since
>>
>>                                UDP/IPv4 is the default transport.
>>
>>
>>        hostname@eth0:161       identical to the previous specification,
>>
>>                                except  that the communication is forced
>>
>>                                to eth0 using the SO_BINDTODEVICE socket
>>
>>                                option.
>>
>>
>>        hostname@eth0@blue      identical to the previous specification,
>>
>>                                except  that  the  communication  occurs
>>
>>                                using  the  eth0  interface  inside  the
>>
>>                                namespace named "blue"  (created,  e.g.,
>>
>>                                using ip netns add ).
>>
>> ...
>>
>>        If the platform supports  binding  to  an  interface  using  the
>>
>>        SO_BINDTODEVICE socket option, the optional @interface specifier
>>
>>        can be added to an IP address or host name.
>>
>>
>>        If the platform supports network namespaces using the setns sys-
>>
>>        tem  call,  the  optional @netns specifier can be added to an IP
>>
>>        address or host name.  If an interface specification (see above)
>>
>>        is not required, two @ s are used, e.g., 127.0.0.1@@blue .
>>
>>
>> Perhaps I can fix the formatting of the first table by separating out the
>> "hostname or ip_ address" and "followed by optional @interface, @namespace,
>> :port"? Any suggestions?
>>
>>
>> Thanks,
>>
>>   Bill
>>
>>
>>
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to