2 questions about tcp/ip stack in RTEMS

Pedro Palomo pedro.palomo at deimos-space.com
Fri Sep 10 12:20:46 UTC 2004


Hi to all:

I am working with RTEMS-4.6, and I have some questions. If somebody can 
help me I will be very thankful.

1.- Is it possible to manage ARP tables in tcp/ip stack, for instance, 
can I add one entry (ip-mac_address) to avoid extra ARP packet on the 
net.Are there any interface in libnetworking to do this?

2.- I am trying to work with multicast sockets, but when add a socket to 
a group, the primitive setsockopt, return an error. is there any error 
in this code?:


-----------------------------------------------------------
  if ((s=socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) {
     perror("error creando socket");
     return 1;
   }

   if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opcion, 
   sizeof(opcion))<0){
     perror("error en  setsockopt");
     return 1;
   }

   inet_aton("239.0.0.1", &dir_mcast);
   info_mcast.imr_multiaddr=dir_mcast;
   info_mcast.imr_interface.s_addr=INADDR_ANY;	

   if (setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &info_mcast,
		 sizeof(info_mcast)) <0) {
     perror("error en  setsockopt");
     close(s);
     return 1;
   }
---------------------------------------------------------


Best regards,

Pedro


===========================================
   D. Pedro Palomo Pérez
   DEIMOS SPACE S.L
   Real Time Systems Division

   Ronda de Poniente 19,
   Edificio Fiteni VI, Portal 2, 2º
   28760 Tres Cantos. Madrid, Spain

   Tel   : +34 91 806 34 70
   Fax   : +34 91 806 34 51
   E-mail: pedro.palomo at deimos-space.com
   Web   : www.deimos-space.com
===========================================




More information about the users mailing list