Apache HTTPD
apr_uri.h
Go to the documentation of this file.
1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * apr_uri.h: External Interface of apr_uri.c
19 */
20
26#ifndef APR_URI_H
27#define APR_URI_H
28
29#include "apu.h"
30
31#include "apr_network_io.h"
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
43#define APR_URI_FTP_DEFAULT_PORT 21
44#define APR_URI_SSH_DEFAULT_PORT 22
45#define APR_URI_TELNET_DEFAULT_PORT 23
46#define APR_URI_GOPHER_DEFAULT_PORT 70
47#define APR_URI_HTTP_DEFAULT_PORT 80
48#define APR_URI_POP_DEFAULT_PORT 110
49#define APR_URI_NNTP_DEFAULT_PORT 119
50#define APR_URI_IMAP_DEFAULT_PORT 143
51#define APR_URI_PROSPERO_DEFAULT_PORT 191
52#define APR_URI_WAIS_DEFAULT_PORT 210
53#define APR_URI_LDAP_DEFAULT_PORT 389
54#define APR_URI_HTTPS_DEFAULT_PORT 443
55#define APR_URI_RTSP_DEFAULT_PORT 554
56#define APR_URI_SNEWS_DEFAULT_PORT 563
57#define APR_URI_ACAP_DEFAULT_PORT 674
58#define APR_URI_NFS_DEFAULT_PORT 2049
59#define APR_URI_TIP_DEFAULT_PORT 3372
60#define APR_URI_SIP_DEFAULT_PORT 5060
64#define APR_URI_UNP_OMITSITEPART (1U<<0)
66#define APR_URI_UNP_OMITUSER (1U<<1)
68#define APR_URI_UNP_OMITPASSWORD (1U<<2)
70#define APR_URI_UNP_OMITUSERINFO (APR_URI_UNP_OMITUSER | \
71 APR_URI_UNP_OMITPASSWORD)
73#define APR_URI_UNP_REVEALPASSWORD (1U<<3)
75#define APR_URI_UNP_OMITPATHINFO (1U<<4)
77#define APR_URI_UNP_OMITQUERY (1U<<5)
78
80typedef struct apr_uri_t apr_uri_t;
81
85struct apr_uri_t {
87 char *scheme;
89 char *hostinfo;
91 char *user;
93 char *password;
95 char *hostname;
97 char *port_str;
99 char *path;
101 char *query;
103 char *fragment;
104
107
110
112 unsigned is_initialized:1;
113
115 unsigned dns_looked_up:1;
117 unsigned dns_resolved:1;
118};
119
120/* apr_uri.c */
128
148 unsigned flags);
149
160 apr_uri_t *uptr);
161
170 const char *hostinfo,
171 apr_uri_t *uptr);
172
174#ifdef __cplusplus
175}
176#endif
177
178#endif /* APR_URI_H */
APR Network library.
APU_DECLARE(void)
Computes SipHash-2-4, producing a 64bit (APR_SIPHASH_DSIZE) hash from a message and a 128bit (APR_SIP...
Definition apr_sha1.c:206
const char * hostinfo
Definition apr_uri.h:170
const apr_uri_t * uptr
Definition apr_uri.h:147
const char * uri
Definition apr_uri.h:159
const apr_uri_t unsigned flags
Definition apr_uri.h:148
apr_size_t size
int apr_status_t
Definition apr_errno.h:44
apr_uint16_t apr_port_t
apr_pool_t * p
Definition md_event.c:32
char * fragment
Definition apr_uri.h:103
char * user
Definition apr_uri.h:91
struct hostent * hostent
Definition apr_uri.h:106
char * scheme
Definition apr_uri.h:87
char * path
Definition apr_uri.h:99
apr_port_t port
Definition apr_uri.h:109
unsigned is_initialized
Definition apr_uri.h:112
char * password
Definition apr_uri.h:93
unsigned dns_resolved
Definition apr_uri.h:117
char * query
Definition apr_uri.h:101
char * hostname
Definition apr_uri.h:95
char * hostinfo
Definition apr_uri.h:89
char * port_str
Definition apr_uri.h:97
unsigned dns_looked_up
Definition apr_uri.h:115