File: pacparser.3

package info (click to toggle)
pacparser 1.4.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,060 kB
  • sloc: ansic: 78,141; makefile: 436; perl: 395; python: 299; sh: 149; asm: 46; javascript: 38
file content (226 lines) | stat: -rw-r--r-- 6,159 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
.TH "pacparser" 3 "Tue Sep 1 2015" "Pacparser" \" -*- nroff -*-
.ad l
.nh
.SH NAME
pacparser - Library to parse proxy auto-confg (PAC) files. 
.PP
API for pacparser library, a library to use proxy auto-config (PAC) files\&. See project homepage: http://github.com/pacparser/pacparser for more information\&.  

.SS "Typedefs"

.in +1c
.ti -1c
.RI "typedef int(* \fBpacparser_error_printer\fP )(const char *fmt, va_list argp)"
.br
.RI "\fIType definition for pacparser_error_printer\&. \fP"
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "int \fBpacparser_init\fP (void)"
.br
.RI "\fIInitializes pac parser\&. \fP"
.ti -1c
.RI "int \fBpacparser_parse_pac_file\fP (const char *pacfile)"
.br
.RI "\fIParses the given PAC file\&. \fP"
.ti -1c
.RI "int \fBpacparser_parse_pac_string\fP (const char *pacstring)"
.br
.RI "\fIParses the given PAC script string\&. \fP"
.ti -1c
.RI "int \fBpacparser_parse_pac\fP (const char *pacfile)"
.br
.RI "\fIParses the gievn pac file\&. \fP"
.ti -1c
.RI "char * \fBpacparser_find_proxy\fP (const char *url, const char *host)"
.br
.RI "\fIFinds proxy for the given URL and Host\&. \fP"
.ti -1c
.RI "char * \fBpacparser_just_find_proxy\fP (const char *pacfile, const char *url, const char *host)"
.br
.RI "\fIFinds proxy for the given PAC file, URL and Host\&. \fP"
.ti -1c
.RI "void \fBpacparser_cleanup\fP (void)"
.br
.RI "\fIDestroys JavaSctipt context\&. \fP"
.ti -1c
.RI "void \fBpacparser_setmyip\fP (const char *ip)"
.br
.RI "\fISets my IP address\&. \fP"
.ti -1c
.RI "void \fBpacparser_set_error_printer\fP (\fBpacparser_error_printer\fP func)"
.br
.RI "\fISets error printing function\&. \fP"
.ti -1c
.RI "void \fBpacparser_enable_microsoft_extensions\fP (void)"
.br
.RI "\fI(Deprecated) Enable Microsoft IPv6 PAC extensions\&. \fP"
.ti -1c
.RI "char * \fBpacparser_version\fP (void)"
.br
.RI "\fIReturns pacparser version\&. \fP"
.in -1c
.SH "Detailed Description"
.PP 
API for pacparser library, a library to use proxy auto-config (PAC) files\&. See project homepage: http://github.com/pacparser/pacparser for more information\&. 


.PP
\fBAuthor:\fP
.RS 4
Manu Garg manugarg@gmail.com 
.RE
.PP

.SH "Function Documentation"
.PP 
.SS "int pacparser_init (void)"

.PP
Initializes pac parser\&. 
.PP
\fBReturns:\fP
.RS 4
0 on failure and 1 on success\&.
.RE
.PP
Initializes JavaScript engine and does few basic initializations specific to pacparser\&. 
.SS "int pacparser_parse_pac_file (const char *pacfile)"

.PP
Parses the given PAC file\&. 
.PP
\fBParameters:\fP
.RS 4
\fIpacfile\fP PAC file to parse\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
0 on failure and 1 on success\&.
.RE
.PP
Reads the given PAC file and evaluates it in the JavaScript context created by pacparser_init\&. 
.SS "int pacparser_parse_pac_string (const char *pacstring)"

.PP
Parses the given PAC script string\&. 
.PP
\fBParameters:\fP
.RS 4
\fIpacstring\fP PAC string to parse\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
0 on failure and 1 on success\&.
.RE
.PP
Evaluates the given PAC script string in the JavaScript context created by pacparser_init\&.
.SS "int pacparser_parse_pac (const char *pacfile)"

.PP
Parses the gievn pac file\&. 
.PP
\fBDeprecated\fP
.RS 4
Use pacparser_parse_pac_file instead\&. 
.PP
\fBParameters:\fP
.RS 4
\fIpacfile\fP PAC file to parse\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
0 on failure and 1 on success\&.
.RE
.PP
.RE
.PP
.PP
Same as pacparser_parse_pac_file\&. Included only for backward compatibility\&. 
.SS "char* pacparser_find_proxy (const char *url, const char *host)"

.PP
Finds proxy for the given URL and Host\&. 
.PP
\fBParameters:\fP
.RS 4
\fIurl\fP URL to find proxy for\&. 
.br
\fIhost\fP Host part of the URL\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
proxy string on success and NULL on error\&.
.RE
.PP
Finds proxy for the given URL and Host\&. This function should be called only after pacparser engine has been initialized (using pacparser_init) and pac script has been parsed (using pacparser_parse_pac_file or pacparser_parse_pac_string)\&. 
.SS "char* pacparser_just_find_proxy (const char *pacfile, const char *url, const char *host)"

.PP
Finds proxy for the given PAC file, URL and Host\&. 
.PP
\fBParameters:\fP
.RS 4
\fIpacfile\fP PAC file to parse\&. 
.br
\fIurl\fP URL to find proxy for\&. 
.br
\fIhost\fP Host part of the URL\&. 
.RE
.PP
\fBReturns:\fP
.RS 4
proxy string on success and NULL on error\&.
.RE
.PP
This function is a wrapper around functions pacparser_init, pacparser_parse_pac_file, pacparser_find_proxy and pacparser_cleanup\&. If you just want to find out proxy for a given set of pac file, url and host, this is the function to call\&. This function takes care of all the initialization and cleanup\&. 
.SS "void pacparser_cleanup (void)"

.PP
Destroys JavaSctipt context\&. This function should be called once you're done with using pacparser engine\&. 
.SS "void pacparser_setmyip (const char *ip)"

.PP
Sets my IP address\&. 
.PP
\fBParameters:\fP
.RS 4
\fIip\fP Custom IP address\&.
.RE
.PP
Sets my IP address to a custom value\&. This is the IP address returned by myIpAddress() javascript function\&. 
.SS "void pacparser_set_error_printer (\fBpacparser_error_printer\fPfunc)"

.PP
Sets error printing function\&. 
.PP
\fBParameters:\fP
.RS 4
\fIfunc\fP Printing function\&.
.RE
.PP
Sets error variadic-argument printing function\&. If not set the messages are printed to stderr\&. If messages begin with DEBUG: or WARNING:, they are not fatal error messages, otherwise they are\&. May be called before \fBpacparser_init()\fP\&. 
.SS "void pacparser_enable_microsoft_extensions (void)"

.PP
(Deprecated) Enable Microsoft IPv6 PAC extensions\&. Deprecated\&. IPv6 extension (*Ex functions) are enabled by default now\&. 
.SS "char* pacparser_version (void)"

.PP
Returns pacparser version\&. 
.PP
\fBReturns:\fP
.RS 4
version string if version defined, '' otherwise\&.
.RE
.PP
Version string is determined at the time of build\&. If built from a released package, version corresponds to the latest release (git) tag\&. If built from the repository, it corresponds to the head revision of the repo\&. 
.SH "Author"
.PP 
Generated automatically by Doxygen for Pacparser from the source code\&.