Sponsored Links
My Products

Archive for the ‘Programming & Design’ Category

linux covering server

I’m presume to do this information and attain it impact in windows os and linux but i can’t seem to attain it run. i ever intend an error. crapper you verify me wats wrong? should i earmark whatever more commands? i’m newborn in this socket planning abstract and i rattling requirement help.

here’s the program:

#include
#include /* exit()*/
#include /* memset (), memcpy()*/
#include /* uname()*/
#include
#include /* socket(), bind(), listen(),accept()*/
#include
#include
#include
#include /* fork(), write(), close()*/

int_GetHostName(char *buffer, int length);

const burn MESSAGE[] = “Hello, World!n”;
const int BACK_LOG=5;

int main(int argc, burn *argv[]){
int serverSocket=0, on=0, port=0,status=0,childPid=0;
struct hostent *hostPtr=NULL;
char hostname[80]=”";
struct sockaddr_in serverName={0};

if (2!=argc){
fprintf(stderr,”Usage: %s n”,argv[0]);
}
port=atoi(argv[1]);
serverSocket=socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
if(-1==serverSocket){
perror(”socket()”);
exit;
}

/*turn soured bond come checking, and earmark opening drawing to be reused -
otherwise the TIME_WAIT phenomenon module preclude protection to these address.port
combinations for (2*MSL) seconds.
*/

on=1;
status=setsockopt(serverSocket, SOL_SOCKET, SO_REUSEADDR, (const char*)&on,sizeof(on));

if(-1==status){
perror(”setsockopt(…,SO_REUSEADDR,…)”);
}

/*when unification is closed, thereis a requirement to waffle to secure every accumulation is transmitted,
so invoke this on also
*/

{
struct waffle linger={0};
linger.1_onoff=1;
linger.1_linger=30;
status=setsockopt(serverSocket,SOL_SOCKET,SO_LINGER,(const char*)&linger,sizeof(linger));
if(-1==status){
perror(”setsockopt(…,SO_LINGER,…)”);
}
}

// FIND OUT WHO I AM

status=_GetHostName(hostname,sizeof(hostname));
if(-1==status){
perror(”_GetHostName()”);
exit(1);
}

hostPtr=gethostbyname(hostname);
if(NULL==hostPtr){
perror(”gethostbyname()”);
exit(1);
}

(void)memset(&serverName,0,sizeof(serverName));
(void)memcpy(&serverName.sin_addr,hostPtr->h_addr,hostPtr->h_length);

/*to earmark computer be contactable on whatever of its IP addresses, uncomnment the mass distinction of code

serverName.sin_addr=hton1(INADDR_ANY);

*/

serverName.sin_family=AF_INET;
serverName.sin_port=htons(port); //network order
status=bind(serverSocket,(structsockaddr*)&serverName,sizeof(serverName));
if(-1==status){
perror(”bind()”);
exit(1);
}

status=listen(serverSocket,BACK_LOG);
if(-1==status){
perror(”listen()”);
exit(1);
}

for(;;){
struct sockaddr_in clientName={0};
int slaveSocket, clientLength=sizeof(clientName);

(void)memset(&clientName,0,sizeof(clientName));

slaveSocket=accept(serverSocket,(struct sockaddr*)&clientName,&clientLength);
if(-1==slaveSocket){
perror(”accept()”);
exit(1);
}

childPid=fork();

switch(childPid){

case -1: /* ERROR */
perror(”fork()”);
exit(1);
case 0: /* female impact */
close(serverSocket);
if(-1==getpeername(slaveSocket,(struct sockaddr*)&clientName,&clientLength)){
perror(”getpeername()”);
}else{
printf(”Connectionrequest from %s n”; , inet_ntoa(clientName.sin_addr));
}

/*Server covering spoecific cipher goes here,

e.g.perform whatever action, move to computer etc.

*/

write(slaveSocket,MESSAGE,strlen(MESSAGE));
close(slaveSocket);
exit(0);
default: /*parentprocess*/
close(slaveSocket);
}
}

return 0;

}

/* Local equal of gethostname() to assistance portability */

int _GetHostName(char *buffer, int length){
struct utsname sysname={0};
int status=0;

status=uname(&sysname);
if(-1!=status){
strncpy(buffer,sysname.nodename,length);
}
return(status);
}

please help..

Read the rest of this entry »

linux meshwork monitor

The code has to be aforementioned a client/server model. The computer should be healthy to encounter discover the info of the meshwork activities of the clients adjoining and authenticate and vanish users from the network. I am old with C/C++, Java & Lisp. I rattling dont undergo where to begin as this is the prototypal instance I hit to do something aforementioned this. Also how crapper I ingest sockets or SNMP to attain the same? Please help.

I am an field enrollee from Bharat and this is our prototypal assemblage mini project.
I dont poverty the software, I requirement to attain a employed one. As I said its the mini send and is fashioned to support us see the planning finished behindhand much a software. So anyone who knows how this crapper be finished gratify help. I dont requirement the whole abstract meet pointers module be great.

Read the rest of this entry »

linux covering server

my asp.net covering is in NT Server.Their is whatever problems in the telecommunicate client,so we poverty to telecommunicate goes finished the UNIX computer from NT Server.
Is iT Possible??
my asp.net covering is in NT Server.Their is whatever problems in the telecommunicate client,so we poverty to telecommunicate goes finished the UNIX computer from NT Server.
Is iT Possible??
Sending Email Via an External SMTP Server asp.net??
I am fascinated in using Qmail Mail computer in Linux. I was mitigated with the Qmail features. I would same to beam around 100k mails(birthday cards, Thanksgiving cards,etc… ) to our clients per day. Currently I am using Windows 2000 papers and streaming IIS Server and our mails are beam from IMailer Server.
At inform i would same to beam mails from a linux OS using Qmail Mail Server and the applications are existence runned in a Windows 2000 papers and runnning IIS Server.
I would same to undergo whether Qmail Mail Server in linux supports(compacts with) IIS Server runnning in Win 2000 for processing mails and sending?
If so i would same to undergo how could i configure my Win System and UNIX System to beam 100k mails per day?

I wish the above requirements mentioned are country and kindky state to me a presently as poosible.

Read the rest of this entry »

linux covering server

i hit a linux server, what is the easiest artefact (language) to physique a website?
i conceive PHP is an overkill, some another idea?

the website should impact over SSL and hit pleasant forms, but not so complicated.
any suggestion?

the exclusive essential abstract is the webpage should be healthy to separate applications on the server.

Read the rest of this entry »

linux covering server

I hit an XML / XSD pair, which I commonly modify with Altova XMLSpy.
I am hunting for a artefact to modify the XML finished the scheme in a kindred artefact to how XMLSpy entireness on Windows.
The server-side would hit to separate on apache / linux.
I am hopefully hunting for something unstoppered maker / liberated and that doesn’t order a aggregation of try to ordered up (that’s ground I don’t poverty XSL)

Does anyone undergo what’s the easiest artefact to do this?

Thanks in advance!

configuring linux

So I’ve downloaded Ubuntu, and I’m rattling hunting nervy to establish it and move using.

Problem is, I hit no intent how to ingest Linux! I hit whatever planning experience, but not likewise such to meet move configuring UNIX without problem.

Can anybody declare a beatific artefact to see how to ingest Linux? Suggestions for beatific websites and books would be greatly understood (I do favour websites, since they are free!).
Any another suggestions would be understood also.
Thank you!

Read the rest of this entry »

linux covering server

mysql computer is already installed in linux and utility also.i poverty to enter my java(core) covering with mysql computer in linux.but i hit ClassNotFoundExcepition in my programe,why plz verify me with solution.my writing is:

import java.sql.* ;

public collection exam
{
public noise vacuum main( String[] args )
{
try
{
Class.forName( “com.mysql.jdbc.Driver” ).newInstance();
try
{
Connection jailbird = DriverManager.getConnection( “jdbc:mysql://localhost/scholar”, “root”, invalid );

try
{
Statement evidence = con.createStatement();

ResultSet rs = statement.executeQuery(”SELECT NAME FROM STUDENT”);

patch ( rs.next() )
{
System.out.println( rs.getString( “NAME” ) );
}

rs.close();
statement.close();
}
grownup (

Read the rest of this entry »

linux covering server

I poverty to unstoppered the choice tender of our Windows 2000 Server( which we hit organized Oracle 9i application) finished the Linux. In housing of windows computer machine( 98/XP/ME) weight jinitiator is decent and swing address (http://IP Address) opens the choice tender of Server and the JAVA applet starts running.
In housing of UNIX digit nonachievement occurs which “Required Plug in missing” . Can anyone support me how crapper I set Jinitiator edition of Linux. Please wage me the address so that I crapper set it successfully

Read the rest of this entry »

linux covering server

I hit prefabricated an scheme covering finished which I utilised to bring mails from a assorted domain. Both the scheme applications and the telecommunicate computer were on the aforementioned UNIX Server and it was employed fine. Few life past I denaturized my computer and today both of them are in assorted servers. After that I am effort this nonachievement in the application.

can’t connect: Certificate unfortunate for mail.v2020.net: consciousness subscribed certificate: /C=US/ST=Unknown/L=Unknown/O=Unknown/OU=Unknown/CN=vision2020.thevision2020blog.com/emailAddress=ssl@vision2020.thevision2020blog.com

Please permit me what I requirement to do inorder to hold this problem.

Read the rest of this entry »

linux covering server

I’m currently nonindustrial PHP applications on a Windows XP machine. I effort everything locally (Apache 2 & php 5), but the springy scheme computer is linux (also Athapascan 2 & php 5).

The files I analyse discover (subversion) ingest definitive paths (the accepted here) that don’t alter to my topical windows box.

Is there a artefact to hit PHP automatically alter lines like:

to impact like:

without having to manually modify everything after apiece review and before apiece checkin?

Read the rest of this entry »