Commit 15f1d4af authored by Pekka Pessi's avatar Pekka Pessi

Generating man pages for utilities.

darcs-hash:20060220143030-65a35-dfa17cfb29df125db56b15a0ff461ff14e4d122e.gz
parent 028754af
......@@ -6,12 +6,30 @@ DIST_SUBDIRS = $(SUBDIRS) win32
PACKAGE = @PACKAGE@
VERSION = @VERSION@
EXTRA_DIST = AUTHORS COPYING COPYRIGHTS README README.developers RELEASE TODO
EXTRA_DIST = AUTHORS COPYING COPYRIGHTS \
README README.developers RELEASE TODO
ACLOCAL_AMFLAGS = -I m4
dist_m4_DATA = m4/sac-general.m4 m4/sac-su.m4
EXTRA_DIST += m4/sac-su2.m4 m4/sac-tport.m4 m4/sac-openssl.m4
dist_m4_DATA = m4/sac-general.m4 m4/sac-su.m4
EXTRA_DIST += m4/sac-su2.m4 m4/sac-tport.m4 m4/sac-openssl.m4
doxygen coverage built-sources clean-built-sources:
man_MANS = man/man1/sip-date.1 man/man1/sip-options.1 \
man/man1/localinfo.1 man/man1/addrinfo.1
$(man_MANS): doxygen
coverage built-sources clean-built-sources:
@$(MAKE) $(AM_MAKEFLAGS) -C libsofia-sip-ua $@
doxygen:
if HAVE_DOXYGEN
@$(MAKE) $(AM_MAKEFLAGS) -C libsofia-sip-ua $@
mkdir -p man man/man1 2> /dev/null
cd utils; doxygen
else
mkdir -p man man/man1 2> /dev/null
-touch $(man_DATA)
endif
.PHONY: coverage built-sources clean-built-sources doxygen
......@@ -37,6 +37,9 @@ AC_CHECK_TOOL(AR, ar, ar)
AC_CHECK_TOOL(LD, ld, ld)
AC_PROG_LIBTOOL
AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen], [echo])
AM_CONDITIONAL([HAVE_DOXYGEN], [test $DOXYGEN = doxygen])
AC_ARG_WITH([aclocal],
[ --with-aclocal Install m4 files in aclocal --print-ac-dir],
[if test "$with_aclocal" = "yes" ; then
......
......@@ -15,6 +15,4 @@ PREDEFINED += \
su_root_s=su_root_t \
_su_task_r=su_task_r
# Exclude Windows IPv6 files
EXCLUDE_PATTERNS += tpipv6.h wspiapi.h aton.c ntoa.c
EXCLUDE_PATTERNS += localinfo.c addrinfo.c
......@@ -22,41 +22,18 @@
*
*/
/**@ingroup su_programs
* @CFILE addrinfo.c
*
* Resolve network address.
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
* @date Created: Sun Jul 14 09:17:21 2002 ppessi
*/
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "sofia-sip/su.h"
/**@ingroup su_programs
* <hr>
* @page addrinfo addrinfo - resolve network services
/**@page addrinfo Resolve network services
*
* @par Name
* addrinfo - resolve network services
*
* @par Synopsis
* @section synopsis Synopsis
*
* <tt>addrinfo [-pcn46] host service</tt>
*
* @par Description
* @section description Description
*
* The @em addrinfo utility will use su_getaddrinfo() to resolve the network
* services and print resolved names.
*
* @par Options
* @section options Options
*
* The @e addrinfo utility accepts following ccommand line options:
* <dl>
......@@ -72,12 +49,30 @@
* <dd>IPv6 only (but including mapped IPv4 addresses).</dd>
* </dl>
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
* @section bugs Reporting Bugs
* Report bugs to <sofia-sip-devel@lists.sourceforge.net>.
*
* @section author Author
* Written by Pekka Pessi <pekka -dot pessi -at- nokia -dot- com>
*
* @section copyright Copyright
* Copyright (C) 2005 Nokia Corporation.
*
* This program is free software; see the source for copying conditions.
* There is @b NO warranty; not even for @b MERCHANTABILITY or <b>FITNESS
* FOR A PARTICULAR PURPOSE</b>.
*/
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "sofia-sip/su.h"
char const help[] =
"usage: addrinfo [-imdn46gslh] [domainname]\n"
"usage: addrinfo [-pnc46] [domainname]\n"
"\t-p query for passive open\n"
"\t-n use numeric host names\n"
"\t-c ask for canonic names\n"
......
......@@ -22,51 +22,27 @@
*
*/
/**@ingroup su_programs
* @CFILE localinfo.c
*
* Utility for obtaining local addressing info.
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
*
*/
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "sofia-sip/su.h"
#include "sofia-sip/su_localinfo.h"
#include "su_module_debug.h"
/**@ingroup su_programs
* @page localinfo localinfo - obtain local network addresses
/**@page localinfo list local network addresses
*
* @par Name
* localinfo - obtain local network addresses
*
* @par Synopsis
* @section synopsis Synopsis
*
* <tt>localinfo [-imdn46gslh] [domainname]</tt>
*
* @par Description
* @section description Description
*
* The @em localinfo utility will obtain the local network addresses
* and print them.
*
* @par Options
* @section options Options
*
* The @e localinfo utility accepts following ccommand line options:
* The @e localinfo utility accepts following command line options:
* <dl>
* <dt>-i</dt>
* <dd>include interface name.</dd>
* <dt>-m</dt>
* <dd>map IPv4 addresses.</dd>
* <dt>-d</dt>
* <dd>require DNS entry.</dd>
* <dd>require a reverse DNS entry.</dd>
* <dt>-n</dt>
* <dd>use numeric host names.</dd>
* <dt>-4</dt>
......@@ -80,26 +56,44 @@
* <dt>-l</dt>
* <dd>Link-level addresses.</dd>
* <dt>-h</dt>
* <dd>Host-internal addresses\.</dd>
* <dd>Host-internal addresses.</dd>
* </dl>
*
* @par Examples
* @section examples Examples
*
* You want to find out local IPv6 addresses:
* @code
* $ localinfo -6
* @endcode
*
* @par
* You want to find out to link-local addresses
* @code
* $ localinfo -l -n
* @endcode
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
* @section bugs Reporting Bugs
* Report bugs to <sofia-sip-devel@lists.sourceforge.net>.
*
* @section author Author
* Written by Pekka Pessi <pekka -dot pessi -at- nokia -dot- com>
*
* @section copyright Copyright
* Copyright (C) 2005 Nokia Corporation.
*
* This program is free software; see the source for copying conditions.
* There is @b NO warranty; not even for @b MERCHANTABILITY or <b>FITNESS
* FOR A PARTICULAR PURPOSE</b>.
*/
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "sofia-sip/su.h"
#include "sofia-sip/su_localinfo.h"
#include "su_module_debug.h"
char const help[] =
"usage: localinfo [-imdn46gslh] [domainname]\n"
"\t-i include interface name\n"
......
......@@ -35,3 +35,6 @@ noinst_HEADERS = apps_utils.h
bin_PROGRAMS = sip-options sip-date
LDADD = ../libsofia-sip-ua/libsofia-sip-ua.la $(GLIB_LIBS)
EXTRA_DIST = Doxyfile
......@@ -22,80 +22,70 @@
*
*/
/**@ingroup sip_programs
/**@page sip-date Print or parse SIP date
*
* @cfile sipdate.c
* @section synopsis Synopsis
*
* SIP date printer/parser
* <tt>sip-date [-n] [SIP-date | [YYYYy] [DDd] [HHh] [MMm] [SS[s]]]</tt>
*
* @par Contributor(s):
* - Pekka Pessi <Pekka.Pessi@nokia.com>.
*
* @date Thu Sep 6 13:15:25 EEST 2001 ppessi
*/
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <stddef.h>
#include <stdlib.h>
#include <sofia-sip/sip.h>
#include <sofia-sip/sip_header.h>
#include <sofia-sip/msg_date.h>
/**@ingroup sip_programs
*
* @page sipdate sipdate - print or parse SIP date
* @section description Description
*
* @par Name
* sipdate - print or parse SIP date
*
* @par Synopsis
*
* <tt>sipdate [-n] [SIP-date | [YYYYy] [DDd] [HHh] [MMm] [SS[s]]]
*
* @par Description
*
* @em sipdate is an utility for printing a SIP date (in the format
* @em sip-date is an utility for printing a SIP date (in the format
* specified by RFC 1123, but the timezone must always be GMT) or parsing a
* given SIP date. The date can be given as a SIP date or by giving year,
* day, hour, minutes and seconds separately.
*
* @par Options
* @section options Options
*
* The @em sipdate utility takes options as follows:
* The @em sip-date utility takes options as follows:
* <dl>
* <dt>-n</dt>
* <dd>The @em sipdate utility prints the date as seconds elapsed since
* <dd>The @em sip-date utility prints the date as seconds elapsed since
* epoch (01 Jan 1900 00:00:00).
* </dd>
* </dl>
*
* @par Examples
* @section examples Examples
*
* You want to convert current time to SIP date:
* @code
* $ sipdate
* $ sip-date
* @endcode
*
* @par
* You want to find out how many seconds there was in 1900's:
* @code
* $ siptime -n 2000y
* 3155673600
* $
* @endcode
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
* @section bugs Reporting Bugs
* Report bugs to <sofia-sip-devel@lists.sourceforge.net>.
*
* @section author Author
* Pekka Pessi <Pekka -dot- Pessi -at- nokia -dot- com>
*
* @section copyright Copyright
* Copyright (C) 2005 Nokia Corporation.
*
* This program is free software; see the source for copying conditions.
* There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*/
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <stddef.h>
#include <stdlib.h>
#include <sofia-sip/sip.h>
#include <sofia-sip/sip_header.h>
#include <sofia-sip/msg_date.h>
b
void usage(void)
{
fprintf(stderr,
"usage: sipdate [-n] "
"usage: sip-date [-n] "
"[SIP-date | [YYYYy] [DDd] [HHh] [MMm] [SS[s]]]\n");
exit(1);
}
......@@ -136,7 +126,7 @@ int main(int ac, char *av[])
if (s[0] < '0' || s[0] > '9') {
if (msg_date_d(&s, &t) < 0) {
fprintf(stderr, "sipdate: %s is not valid time\n", s);
fprintf(stderr, "sip-date: %s is not valid time\n", s);
exit(1);
}
}
......
/**@page sip-options sip-options - Query SIP OPTIONS
*
* @par Name
* sip-options - Query SIP OPTIONS
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
* @par Synopsis
*/
/**@page sip-options Query SIP OPTIONS
*
* @section synopsis Synopsis
* <tt>sip-options [--bind=url] [--from=url] [-a|--all] to </tt>
*
* @par Description
* @section description Description
* The @em sip-options utility sends a SIP OPTIONS request (or any other SIP
* request) to a SIP server.
*
* @par
* The @em options tool will print out status line and interesting headers
* The @em sip-options tool will print out status line and interesting headers
* from the response, excluding From, Via, Call-ID, and CSeq. The message
* body is also printed.
*
* @par Command Line Options
* @section options Command Line Options
* The @e options utility accepts following command line options:
* <dl>
* <dt>-m url | --contact=url | --bind=url</dt>
......@@ -33,7 +53,7 @@
* <dt>--from=url</dt>
* <dd>Specifies the @b From header. Unless this option is used or the
* environment variable @c SIPADDRESS is set, local Contact URL is used
* as b@b From header as well.
* as @b From header as well.
* </dd>
* <dt>--mf=n</dt>
* <dd>Specify the initial Max-Forwards count (defaults to 70, stack default).
......@@ -43,42 +63,34 @@
* </dd>
* </dl>
*
* @par Return Codes
* @section return Return Codes
* <table>
* <tr><td>0<td>when successful (a 2XX-series response is received)
* <tr><td>1<td>when unsuccessful (a 3XX..6XX-series response is received)
* <tr><td>2<td>initialization failure
* </table>
*
* @par Examples
* @section examples Examples
* You want to query supported features of sip:essip00net.nokia.com:
* @code
* $ options sip:essip00net.nokia.com
* @endcode
*
* @par Environment
* @c SIPADDRESS, @c sip_proxy, @c NTA_DEBUG, @c TPORT_DEBUG, @c TPORT_LOG.
* @section environment Environment
* #SIPADDRESS, #sip_proxy, #NTA_DEBUG, #TPORT_DEBUG, #TPORT_LOG.
*
* Copyright (C) 2005 Nokia Corporation.
* @section bugs Reporting Bugs
* Report bugs to <sofia-sip-devel@lists.sourceforge.net>.
*
* @section author Author
* Written by Pekka Pessi <pekka -dot pessi -at- nokia -dot- com>
*
* @STARTLGPL@
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* @section copyright Copyright
* Copyright (C) 2005 Nokia Corporation.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
* @ENDLGPL@
* This program is free software; see the source for copying conditions.
* There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*/
#include "config.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment