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

Generating man pages for utilities.

darcs-hash:20060220143030-65a35-dfa17cfb29df125db56b15a0ff461ff14e4d122e.gz
parent 028754af
...@@ -6,12 +6,30 @@ DIST_SUBDIRS = $(SUBDIRS) win32 ...@@ -6,12 +6,30 @@ DIST_SUBDIRS = $(SUBDIRS) win32
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
VERSION = @VERSION@ 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 ACLOCAL_AMFLAGS = -I m4
dist_m4_DATA = m4/sac-general.m4 m4/sac-su.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 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 $@ @$(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) ...@@ -37,6 +37,9 @@ AC_CHECK_TOOL(AR, ar, ar)
AC_CHECK_TOOL(LD, ld, ld) AC_CHECK_TOOL(LD, ld, ld)
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen], [echo])
AM_CONDITIONAL([HAVE_DOXYGEN], [test $DOXYGEN = doxygen])
AC_ARG_WITH([aclocal], AC_ARG_WITH([aclocal],
[ --with-aclocal Install m4 files in aclocal --print-ac-dir], [ --with-aclocal Install m4 files in aclocal --print-ac-dir],
[if test "$with_aclocal" = "yes" ; then [if test "$with_aclocal" = "yes" ; then
......
...@@ -15,6 +15,4 @@ PREDEFINED += \ ...@@ -15,6 +15,4 @@ PREDEFINED += \
su_root_s=su_root_t \ su_root_s=su_root_t \
_su_task_r=su_task_r _su_task_r=su_task_r
# Exclude Windows IPv6 files EXCLUDE_PATTERNS += localinfo.c addrinfo.c
EXCLUDE_PATTERNS += tpipv6.h wspiapi.h aton.c ntoa.c
...@@ -22,41 +22,18 @@ ...@@ -22,41 +22,18 @@
* *
*/ */
/**@ingroup su_programs /**@page addrinfo Resolve network services
* @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
* *
* @par Name * @section synopsis Synopsis
* addrinfo - resolve network services
*
* @par Synopsis
* *
* <tt>addrinfo [-pcn46] host service</tt> * <tt>addrinfo [-pcn46] host service</tt>
* *
* @par Description * @section description Description
* *
* The @em addrinfo utility will use su_getaddrinfo() to resolve the network * The @em addrinfo utility will use su_getaddrinfo() to resolve the network
* services and print resolved names. * services and print resolved names.
* *
* @par Options * @section options Options
* *
* The @e addrinfo utility accepts following ccommand line options: * The @e addrinfo utility accepts following ccommand line options:
* <dl> * <dl>
...@@ -72,12 +49,30 @@ ...@@ -72,12 +49,30 @@
* <dd>IPv6 only (but including mapped IPv4 addresses).</dd> * <dd>IPv6 only (but including mapped IPv4 addresses).</dd>
* </dl> * </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[] = char const help[] =
"usage: addrinfo [-imdn46gslh] [domainname]\n" "usage: addrinfo [-pnc46] [domainname]\n"
"\t-p query for passive open\n" "\t-p query for passive open\n"
"\t-n use numeric host names\n" "\t-n use numeric host names\n"
"\t-c ask for canonic names\n" "\t-c ask for canonic names\n"
......
...@@ -22,51 +22,27 @@ ...@@ -22,51 +22,27 @@
* *
*/ */
/**@ingroup su_programs /**@page localinfo list local network addresses
* @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
* *
* @par Name * @section synopsis Synopsis
* localinfo - obtain local network addresses
*
* @par Synopsis
* *
* <tt>localinfo [-imdn46gslh] [domainname]</tt> * <tt>localinfo [-imdn46gslh] [domainname]</tt>
* *
* @par Description * @section description Description
* *
* The @em localinfo utility will obtain the local network addresses * The @em localinfo utility will obtain the local network addresses
* and print them. * 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> * <dl>
* <dt>-i</dt> * <dt>-i</dt>
* <dd>include interface name.</dd> * <dd>include interface name.</dd>
* <dt>-m</dt> * <dt>-m</dt>
* <dd>map IPv4 addresses.</dd> * <dd>map IPv4 addresses.</dd>
* <dt>-d</dt> * <dt>-d</dt>
* <dd>require DNS entry.</dd> * <dd>require a reverse DNS entry.</dd>
* <dt>-n</dt> * <dt>-n</dt>
* <dd>use numeric host names.</dd> * <dd>use numeric host names.</dd>
* <dt>-4</dt> * <dt>-4</dt>
...@@ -80,26 +56,44 @@ ...@@ -80,26 +56,44 @@
* <dt>-l</dt> * <dt>-l</dt>
* <dd>Link-level addresses.</dd> * <dd>Link-level addresses.</dd>
* <dt>-h</dt> * <dt>-h</dt>
* <dd>Host-internal addresses\.</dd> * <dd>Host-internal addresses.</dd>
* </dl> * </dl>
* *
* @par Examples * @section examples Examples
* *
* You want to find out local IPv6 addresses: * You want to find out local IPv6 addresses:
* @code * @code
* $ localinfo -6 * $ localinfo -6
* @endcode * @endcode
*
* @par
* You want to find out to link-local addresses * You want to find out to link-local addresses
* @code * @code
* $ localinfo -l -n * $ localinfo -l -n
* @endcode * @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[] = char const help[] =
"usage: localinfo [-imdn46gslh] [domainname]\n" "usage: localinfo [-imdn46gslh] [domainname]\n"
"\t-i include interface name\n" "\t-i include interface name\n"
......
...@@ -35,3 +35,6 @@ noinst_HEADERS = apps_utils.h ...@@ -35,3 +35,6 @@ noinst_HEADERS = apps_utils.h
bin_PROGRAMS = sip-options sip-date bin_PROGRAMS = sip-options sip-date
LDADD = ../libsofia-sip-ua/libsofia-sip-ua.la $(GLIB_LIBS) LDADD = ../libsofia-sip-ua/libsofia-sip-ua.la $(GLIB_LIBS)
EXTRA_DIST = Doxyfile
...@@ -22,80 +22,70 @@ ...@@ -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): * @section description Description
* - 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
* *
* @par Name * @em sip-date is an utility for printing a SIP date (in the format
* 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
* specified by RFC 1123, but the timezone must always be GMT) or parsing a * 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, * given SIP date. The date can be given as a SIP date or by giving year,
* day, hour, minutes and seconds separately. * 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> * <dl>
* <dt>-n</dt> * <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). * epoch (01 Jan 1900 00:00:00).
* </dd> * </dd>
* </dl> * </dl>
* *
* @par Examples * @section examples Examples
* *
* You want to convert current time to SIP date: * You want to convert current time to SIP date:
* @code * @code
* $ sipdate * $ sip-date
* @endcode * @endcode
*
* @par
* You want to find out how many seconds there was in 1900's: * You want to find out how many seconds there was in 1900's:
* @code * @code
* $ siptime -n 2000y * $ siptime -n 2000y
* 3155673600 * 3155673600
* $
* @endcode * @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) void usage(void)
{ {
fprintf(stderr, fprintf(stderr,
"usage: sipdate [-n] " "usage: sip-date [-n] "
"[SIP-date | [YYYYy] [DDd] [HHh] [MMm] [SS[s]]]\n"); "[SIP-date | [YYYYy] [DDd] [HHh] [MMm] [SS[s]]]\n");
exit(1); exit(1);
} }
...@@ -136,7 +126,7 @@ int main(int ac, char *av[]) ...@@ -136,7 +126,7 @@ int main(int ac, char *av[])
if (s[0] < '0' || s[0] > '9') { if (s[0] < '0' || s[0] > '9') {
if (msg_date_d(&s, &t) < 0) { 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); exit(1);
} }
} }
......
/**@page sip-options sip-options - Query SIP OPTIONS /*
* * This file is part of the Sofia-SIP package
* @par Name *
* sip-options - Query SIP OPTIONS * 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> * <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 * The @em sip-options utility sends a SIP OPTIONS request (or any other SIP
* request) to a SIP server. * request) to a SIP server.
* *
* @par * The @em sip-options tool will print out status line and interesting headers
* The @em options tool will print out status line and interesting headers
* from the response, excluding From, Via, Call-ID, and CSeq. The message * from the response, excluding From, Via, Call-ID, and CSeq. The message
* body is also printed. * body is also printed.
* *
* @par Command Line Options * @section options Command Line Options
* The @e options utility accepts following command line options: * The @e options utility accepts following command line options:
* <dl> * <dl>
* <dt>-m url | --contact=url | --bind=url</dt> * <dt>-m url | --contact=url | --bind=url</dt>
...@@ -33,7 +53,7 @@ ...@@ -33,7 +53,7 @@
* <dt>--from=url</dt> * <dt>--from=url</dt>
* <dd>Specifies the @b From header. Unless this option is used or the * <dd>Specifies the @b From header. Unless this option is used or the
* environment variable @c SIPADDRESS is set, local Contact URL is used * 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> * </dd>
* <dt>--mf=n</dt> * <dt>--mf=n</dt>
* <dd>Specify the initial Max-Forwards count (defaults to 70, stack default). * <dd>Specify the initial Max-Forwards count (defaults to 70, stack default).
...@@ -43,42 +63,34 @@ ...@@ -43,42 +63,34 @@
* </dd> * </dd>
* </dl> * </dl>
* *
* @par Return Codes * @section return Return Codes
* <table> * <table>
* <tr><td>0<td>when successful (a 2XX-series response is received) * <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>1<td>when unsuccessful (a 3XX..6XX-series response is received)
* <tr><td>2<td>initialization failure * <tr><td>2<td>initialization failure
* </table> * </table>
* *
* @par Examples * @section examples Examples
* You want to query supported features of sip:essip00net.nokia.com: * You want to query supported features of sip:essip00net.nokia.com:
* @code * @code
* $ options sip:essip00net.nokia.com * $ options sip:essip00net.nokia.com
* @endcode * @endcode
* *
* @par Environment * @section environment Environment
* @c SIPADDRESS, @c sip_proxy, @c NTA_DEBUG, @c TPORT_DEBUG, @c TPORT_LOG. * #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> * Written by Pekka Pessi <pekka -dot pessi -at- nokia -dot- com>
* *
* @STARTLGPL@ * @section copyright Copyright
* This library is free software; you can redistribute it and/or * Copyright (C) 2005 Nokia Corporation.
* 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 * This program is free software; see the source for copying conditions.
* License along with this library; if not, write to the Free Software * There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * PARTICULAR PURPOSE.
* 02110-1301 USA
* @ENDLGPL@
*/ */
#include "config.h" #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