[GE dev] IPv6 commlib

igardais igardais at yahoo.fr
Tue Mar 31 10:18:08 BST 2009


    [ The following text is in the "iso-8859-1" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some special characters may be displayed incorrectly. ]

It's an elegant way to gently unroll, step by step, all problems related to IPv6 implementation.

>> If ipv6 handle creation does not work, the application can re-try with ipv4 as fallback.
What about people using both IPv4-only and IPv6-only clients ? The server should be able to handle both kind of connections. The IPv6 framework might in fact be an "IPvX-Independant" framework (handling IPv4 fallback internally).

I'll first try to get the basics working.

Ionel

--- En date de : Mar 31.3.09, crei <crei at sun.com> a écrit :
De: crei <crei at sun.com>
Objet: Re: [GE dev] IPv6 commlib
?: dev at gridengine.sunsource.net
Date: Mardi 31 Mars 2009, 10h31


On 03/30/09 18:06, igardais
 wrote:
> --- En date de : Lun 30.3.09, crei <crei at sun.com> a écrit :
>> De: crei <crei at sun.com>
>> Objet: Re: [GE dev] IPv6 commlib
>> ?: dev at gridengine.sunsource.net
>> Date: Lundi 30 Mars 2009, 17h38
>>> Create an IPv6 only commlib beside the original
>> commlib ?
>> I do not understand this - can you explain more?
>
> I had in mind the option you propose in the previous point : create a
cl_tcpv6_framework.[ch].

Ok ;-)


The only thing to change for the application is to specify a different
framework
type when creating the communication handle:

cl_com_handle_t* cl_com_create_handle(int*                      commlib_error,
                                       cl_framework_t            framework,
                                       cl_xml_connection_type_t  data_flow_type
,

     cl_bool_t
service_provider ,
                                       int                       port,
                                       cl_tcp_connect_t
tcp_connect_mode,
                                       char*
component_name,
                                       unsigned long             component_id,
                                       int
select_sec_timeout,
                                       int
select_usec_timeout);


If ipv6 handle creation does not work, the application can re-try with ipv4 as
fallback. What do you think?

To generate a new framework I would define additional type in this struct:

typedef enum cl_framework_def {
    CL_CT_UNDEFINED = 0,
    CL_CT_TCP,        /* tcp/ip framework */
    CL_CT_SSL         /* secure socket layer */
}
 cl_framework_t;

let's say CL_CT_TCPV6 for example.

Then you should get lot's of compile errors for the switches using this
typedef because
there should be no default switch ...


#ifdef __CL_FUNCTION__
#undef __CL_FUNCTION__
#endif
#define __CL_FUNCTION__ "cl_com_read_GMSH()"
int cl_com_read_GMSH(cl_com_connection_t* connection, unsigned long
*only_one_read) {

    if (connection == NULL) {
       CL_LOG(CL_LOG_ERROR,"connection pointer is NULL");
       return CL_RETVAL_PARAMS;
    }

    switch(connection->framework_type ) {
       case CL_CT_TCP: {
          return cl_com_tcp_read_GMSH(connection, only_one_read);
       }
       case CL_CT_SSL: {
          return cl_com_ssl_read_GMSH(connection, only_one_read);
       }
       case CL_CT_UNDEFINED: {
          break;
       }
    }
    return CL_RETVAL_UNDEFINED_FRAMEWORK;
}


Then you can
 straight forward implement the functionality by creating an tcpv6
function
and add it to the switch case...

What do you think?

Regards,

Christian


>
> Ionel
>
> ------------------------------------------------------
>
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=39&dsMessageId=149425
>
> To unsubscribe from this discussion, e-mail:
[dev-unsubscribe at gridengine.sunsource.net].

--
Sun Microsystems GmbH             Christian Reissmann
Dr.-Leo-Ritter-Str. 7             Software Engineer
D-93049 Regensburg                Phone: +49 (0)941 3075 112
Germany                           Fax:   +49 (0)941 3075 222
http://www.sun.de                 mailto: Christian.Reissmann at sun.com
                                   http://www.sun.com/gridengine
Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, D-85551
 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=39&dsMessageId=150321

To unsubscribe from this discussion, e-mail:
[dev-unsubscribe at gridengine.sunsource.net].





More information about the gridengine-users mailing list