[GE dev] IPv6 commlib

crei crei at sun.com
Tue Mar 31 09:31:49 BST 2009

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

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_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__
#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: {

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

What do you think?



> 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
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


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

More information about the gridengine-users mailing list