コード例 #1
0
    def send_add_vap(self, vap):
        """Send a ADD_VAP message.
        Args:
            vap: an VAP object
        Returns:
            None
        Raises:
            TypeError: if vap is not an VAP object
        """

        add_vap = Container(version=PT_VERSION,
                            type=PT_ADD_VAP,
                            length=22,
                            seq=self.wtp.seq,
                            hwaddr=vap.block.hwaddr.to_raw(),
                            channel=vap.block.channel,
                            band=vap.block.band,
                            net_bssid=vap.net_bssid.to_raw(),
                            ssid=vap.ssid.to_raw())

        add_vap.length = add_vap.length + len(vap.ssid)
        LOG.info("Add vap %s", vap)

        msg = ADD_VAP.build(add_vap)
        self.stream.write(msg)
コード例 #2
0
    def send_add_vap(self, vap):
        """Send a ADD_VAP message.
        Args:
            vap: an VAP object
        Returns:
            None
        Raises:
            TypeError: if vap is not an VAP object
        """

        add_vap = Container(version=PT_VERSION,
                            type=PT_ADD_VAP,
                            length=22,
                            seq=self.wtp.seq,
                            hwaddr=vap.block.hwaddr.to_raw(),
                            channel=vap.block.channel,
                            band=vap.block.band,
                            net_bssid=vap.net_bssid.to_raw(),
                            ssid=vap.ssid.to_raw())

        add_vap.length = add_vap.length + len(vap.ssid)
        LOG.info("Add vap %s", vap)

        msg = ADD_VAP.build(add_vap)
        self.stream.write(msg)
コード例 #3
0
    def send_add_vap(self, vap):
        """Send a ADD_VAP message."""

        msg = Container(length=ADD_VAP.sizeof(),
                        hwaddr=vap.block.hwaddr.to_raw(),
                        channel=vap.block.channel,
                        band=vap.block.band,
                        bssid=vap.bssid.to_raw(),
                        ssid=vap.ssid.to_raw())

        return self.send_message(PT_ADD_VAP, msg)