MATE: Mapping two diameter sessions via ipv6prefix with different length

asked 2019-11-26 08:53:34 +0000

ULI gravatar image

updated 2019-11-26 08:56:11 +0000

I have a question regarding MATE. I have two diameter interfaces A and B. In both interfaces packets (PDU) are mapped to each other via the diameter session id to a GOP. Sometimes there is a mapping between sessions helpful (GOG?). The only possible mapping can be done based on a parameter called ipv6prefix. In interface A it contains the IPv6 prefix with 64 bit in the other interface B with 128bit. - Is it possible to map both sessions to each other? So the rule should be: if ipv6prefix of interface B contains ipv6prefix of interface A, then map both to each other.

example for IPv6prefix in bytes on interface A:
3a:11:05:98:00:07:06:01
example for IPv6prefix in bytes on interface B:
3a:11:05:98:00:07:06:01:5a:2c:80:ff:fe:22:22:22

Here my MATE example:

 // extract sessionid and all other parameters needed of a pdu. sessionid is needed for mapping.
    Pdu diam_pdu Proto diameter Transport ip {
            Extract sessionid From diameter.Session-Id;
        Extract ipv6prefixbytes From diameter.framed_ipv6_prefix_bytes;
    };

    // Then create a GOP (Group Of Pdus) where the each GOP contains all the PDUs
    // (msgs) that session_id match.

    Gop diam_A_session On diam_pdu Match (sessionid) {
            Start();
            Stop(never);

            // extract ipv6prefixbytes for further mapping
        Extra(ipv6prefixbytes);    
    };

    Gog diam_binding_A_B_session {
    // How to map them valid?
    Member diam_session(ipv6prefixbytes);
    };
edit retag flag offensive close merge delete