Subject: please-clarify my doubts

From: krishna moorthy <[email-masked]>
Date: 19 Mar 2001 22:05:49 JVT

[To be removed from this list send the message "unsubscribe fwtk-users" in the
BODY of a mail message to [email-masked].]

Sir,
I am J. Krishnamoorthy, completed my B.E., and now working as an software 
engineer.  I am interested in studying firewall.  Now i am analizing the 
codes of HTTP proxy in TIS.  I am having some doubts.  Kindly rectify them.

I am doing my works in Red Hat Linux 7.0.  
In http proxy there is function called go_error(shown below). 

1.) In this fn. i don't know what is meant by va_alist, va_dcl, 
va_list.  What is the use of these things?

FUNCTION GO_ERROR:

int go_error(sockfd, errorno, msg, va_alist)
int sockfd;
int errorno;
char *msg;
va_dcl
{	static int last_errno = 0;
	va_list marker;

	if( errorno != last_errno){	/* flush previous error stuff */
		if( last_errno){
			goenderror(sockfd);
		}
		last_errno = errorno;
		if( last_errno){
			gostarterror(sockfd, errorno);
		}
	}
	if( msg != NULL){
		va_start(marker);
		vsprintf(errbuf, msg, marker);
		va_end(marker);
		if( (rem_type & (TYPE_HTTP|TYPE_DIR)) == (TYPE_DIR)){
			say_sub(sockfd,"-");
		}
		say_sub(sockfd, errbuf);
		if( (rem_type & (TYPE_HTTPREQ|TYPE_PROXYCLIENT)) || rem_typech == 'h'){
			say(sockfd, "<br>");
		}else if( rem_type & TYPE_DIR){
			say(sockfd, "\t\t\t");
		}else {
			say(sockfd, " ");
		}
	}

	return 0;
}

2.) Suppose if i wish to implement this function in c++, please kindly
guide me how to convert that va_alist from c to c++ (or) is there any 
need to add special header files.

3.) In the code of Http there are options like default policy, browser,
id string, ident, url-filter, safejave, java, javascript...
sir, i don't know how to apply them in the netperm-table i.e. i am in
need of sample netperm-table with all options.

4.) From book, i came to know that it is possible to implement ftp and 
authentication in http proxy.

sir, we are doing our work in browsers.  How it is possible to write
files in browsers through ftp. Please kindly guide me.

also, guide me how to implement authentication.  Is it possible to add 
username and password through browser.

5.) Sir, suppose if wish to control the printer through this proxy, what i
have to do? and also if i don't want to allow downloading of images what are
things i have to do?

sir, kindly clarify my doubts and guide me in the correct sense.
Please answer me, atleast for some questions at the earliest.
expecting your positive reply.
I thank you sir.

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

---

From: Rick Murphy <[email-masked]>
Date: Mon, 19 Mar 2001 22:22:45 -0500

>va_list.  What is the use of these things?

These are used to support variable argument lists. man varargs on your 
favorite system should give you some help.

>need to add special header files.

stdarg.h should be adequate to make these work.

>need of sample netperm-table with all options.

I don't think anyone uses *all* the options in http-gw; indeed, some of the 
documented options aren't implemented - http authentication, for example.

>files in browsers through ftp. Please kindly guide me.

I don't know how to put files using FTP through a browser. Anyone else?

>username and password through browser.

Authentication by a remove web server (http authentication) will work 
through http-gw. The proxy doesn't support proxy authentication, however.

>have to do? and also if i don't want to allow downloading of images what are

The browser is responsible for handling printing of web pages - the proxy 
doesn't play any part in the printing process. There's no reliable way to 
disallow download of images; HTTP 0.9, which some servers still use, 
doesn't send a MIME Content-Type header.
         -Rick

---

From: Keith Young <[email-masked]>
Date: Tue, 20 Mar 2001 07:24:55 -0500

> I don't know how to put files using FTP through a browser. Anyone else?

Easy... just open a window in your browser to your favorite site (say
"ftp://ftp.v-one.com/"), and drag a file into that window. It should (at
least it does with Netscape 4.x and IE 5.x) begin the upload to the FTP
site.

> >have to do?
> doesn't play any part in the printing process. 

Do you want to print through the browser or just access a printer? 

You could open up the printer port using plug-gw or lp-gw, but the
browser machine will need to push the printer request (somehow?).

> > and also if i don't want to allow downloading of images what are
> > things i have to do?
>
> There's no reliable way to

Rick, could you filter URLs to disallow any "*.gif, *.jpg, *.png" URLs?
Of course, you would need to do some trickery if they also wanted
HTTP/1.1...

-- 
--Keith Young
-Director of Customer Care/Support, V-ONE Corp.
[email-masked]