/*--------------------------- includes ------------------------------*/
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
/*--------------------------- defines -------------------------------*/
/*--------------------------- typedefs ------------------------------*/
/*--------------------------- globals -------------------------------*/
/*-------------------------- prototypes -----------------------------*/
/*----------------------------- main --------------------------------*/
int main( int argc, char *argv[] )
{
   int client_socket;
   char  wort[30]={"Verbindung aufgebaut!"};
   char * server;
   struct servent *serviceinfo;
   struct sockaddr_in ep_addr;
   struct hostent *hostinfo;
   int i,j;
   server="linux";
/*   hostinfo=gethostbyname("linux");
   serviceinfo=getservbyname("schiff","tcp");*/
   /*memcpy((char *) &ep_addr.sin_addr,hostinfo->h_addr,hostinfo->h_length);*/
   ep_addr.sin_addr.s_addr = inet_addr("169.254.0.2");
   ep_addr.sin_port=htons((u_char)9000);//serviceinfo->s_port;
   client_socket = socket(AF_INET,SOCK_STREAM,0);
   j=connect(client_socket,(struct sockaddr*)&ep_addr,sizeof(ep_addr));   //Hier tritt Fehler auf(durch perror("connect")): Address family not supported by protocol
   
   printf("%d %d %u %u\n",j,client_socket,ep_addr.sin_port);
   perror("connect:");
   if(j>=0){
      printf("verbunden mit linux");
      i=write(client_socket,wort,sizeof(wort));
      if(i<0)
         printf("Übertragung OK!");
      else
         printf("Übertragung fehlgeschlagen!");
      close(client_socket);
   }
   else
      printf("Fehler\n");
   return 0;
}
das ist der client, die formatierung hier ist natürlich komisch. der server funktioniert, die rückgabewerte beim server für bind und listen sind richtig, port und ip-addressen stimmen auch.
ich hoff jemand erkennt den fehler! mfg