Пример #1
0
    def _parse_message(self, recv_message):
        """
        Note that this is pretty symmetrical to the same method in CGSNClient.
        """
        dst, src, msg_type, msg = basic_message_verification(recv_message)

        #
        # source must be CIPOP:
        #
        if src != CIPOP:
            raise MalformedMessage("unexpected source in received message: "
                                   "%d (expected %d)" % (src, CIPOP))

        #
        # verify message type:
        # TODO how does this exactly work?
        #
        if msg_type != CICGINT:
            MalformedMessage("unexpected msg_type in received message: "
                             "%d (expected %d)" % (msg_type, CICGINT))

        #
        # TODO verification of destination.
        # ...

        return dst, src, msg_type, msg
Пример #2
0
    def _parse_message(self, recv_message):
        """
        Note that this is pretty symmetrical to the same method in CGSNClient.
        """
        dst, src, msg_type, msg = basic_message_verification(recv_message)

        #
        # source must be CIPOP:
        #
        if src != CIPOP:
            raise MalformedMessage(
                "unexpected source in received message: "
                "%d (expected %d)" % (src, CIPOP))

        #
        # verify message type:
        # TODO how does this exactly work?
        #
        if msg_type != CICGINT:
            MalformedMessage(
                "unexpected msg_type in received message: "
                "%d (expected %d)" % (msg_type, CICGINT))

        #
        # TODO verification of destination.
        # ...

        return dst, src, msg_type, msg
Пример #3
0
    def _parse_message(self, recv_message):
        log.trace("_parse_message: recv_message=%r", recv_message)

        dst, src, msg_type, msg = basic_message_verification(recv_message)

        #
        # destination must be us, CIPOP:
        #
        if dst != CIPOP:
            raise MalformedMessage(
                "unexpected destination in received message: "
                "%d (we are %d)" % (dst, CIPOP))

        #
        # verify message type:
        # TODO how does this exactly work?
        #
        if msg_type != CICGINT:
            MalformedMessage("unexpected msg_type in received message: "
                             "%d (should be %d)" % (msg_type, CICGINT))

        #
        # TODO verification of source.
        # ...

        return src, msg_type, msg
Пример #4
0
    def _parse_message(self, recv_message):
        log.trace("_parse_message: recv_message=%r", recv_message)

        dst, src, msg_type, msg = basic_message_verification(recv_message)

        #
        # destination must be us, CIPOP:
        #
        if dst != CIPOP:
            raise MalformedMessage(
                "unexpected destination in received message: "
                "%d (we are %d)" % (dst, CIPOP))

        #
        # verify message type:
        # TODO how does this exactly work?
        #
        if msg_type != CICGINT:
            MalformedMessage(
                "unexpected msg_type in received message: "
                "%d (should be %d)" % (msg_type, CICGINT))

        #
        # TODO verification of source.
        # ...

        return src, msg_type, msg