
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<netdb.h>
#include<unistd.h>
#include<sys/socket.h>
#include<netinet/in_systm.h>
#include<netinet/in.h>
#include<netinet/ip.h>
#include<arpa/inet.h>
#include<fcntl.h>

#include<sys/stat.h>
#include<errno.h>

#include"sitar_scan.h"
#include"sitar_com.h"
#include<almemsys/almemsys.h>
#include"jpreturn.h"

#include "version.h"





int self_set_request(char * backdata, char * url_dom, char * url_pass, int max, char * mes)
{
int ret;
ret = 0;

if((strlen(url_dom) + strlen(url_pass) + 128 + 115) < max){
   sprintf(backdata,
     "%s /%s HTTP/1.0\nHost: %s\nUser-Agent: %s(monitorring server)\nPragma: no-cache\nCache-Control: no-cache\r\n\r\n",
     mes, url_pass, url_dom, VERSION);
   }
else{
   sprintf(backdata,
     "HEAD /BUF_SIZE_OVER HTTP/1.0\nHost: zither\nUser-Agent: %s(monitorring server)\nPragma: no-cache\nCache-Control: no-cache\r\n\r\n", VERSION);
   ret =-1;
   }

return ret;
}


