about summary refs log tree commit diff stats
path: root/data/maps/the_symbolic/rooms/Red Blue Room.txtpb
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-09-06 09:20:28 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2025-09-06 09:20:28 -0400
commitbb4b16ca06c70cf263424955713c91117f2f1813 (patch)
tree1f234246ad48a2472904e92a6ff48fc7f13e1c49 /data/maps/the_symbolic/rooms/Red Blue Room.txtpb
parentebda0b634c2396338b86b45128bf507c967e88a7 (diff)
downloadlingo2-archipelago-bb4b16ca06c70cf263424955713c91117f2f1813.tar.gz
lingo2-archipelago-bb4b16ca06c70cf263424955713c91117f2f1813.tar.bz2
lingo2-archipelago-bb4b16ca06c70cf263424955713c91117f2f1813.zip
[Client] Handle letter shuffle
Cyan doors are not handled properly yet.
Diffstat (limited to 'data/maps/the_symbolic/rooms/Red Blue Room.txtpb')
0 files changed, 0 insertions, 0 deletions
} /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/* Copyright 2021 The libwifi Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "radiotap.h"
#include "../../core/radiotap/radiotap.h"
#include "../../core/radiotap/radiotap_iter.h"

#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#define LIBWIFI_RADIOTAP_HEADER_LEN 8

size_t libwifi_create_radiotap(struct libwifi_radiotap_info *info, char *radiotap_header) {
    struct ieee80211_radiotap_header rtap_hdr = {0};
    rtap_hdr.it_version = 0;
    rtap_hdr.it_pad = 0;
    rtap_hdr.it_present = info->present;
    rtap_hdr.it_len = sizeof(struct ieee80211_radiotap_header);

    char rtap_data[LIBWIFI_MAX_RADIOTAP_LEN - LIBWIFI_RADIOTAP_HEADER_LEN] = {0};
    int offset = 0;

    uint32_t presence_bit = rtap_hdr.it_present;
    for (int field = 0; field < radiotap_ns.n_bits; field++) {
        if (presence_bit & 1) {
            switch (field) {
                case IEEE80211_RADIOTAP_CHANNEL:
                    memcpy(rtap_data + offset, &info->channel.freq, sizeof(info->channel.freq));
                    offset += sizeof(info->channel.freq);
                    memcpy(rtap_data + offset, &info->channel.flags, sizeof(info->channel.flags));
                    offset += sizeof(info->channel.flags);
                    break;
                case IEEE80211_RADIOTAP_RATE:
                    memcpy(rtap_data + offset, &info->rate_raw, sizeof(info->rate_raw));
                    offset += sizeof(info->rate_raw);
                    break;
                case IEEE80211_RADIOTAP_DBM_ANTSIGNAL:
                    memcpy(rtap_data + offset, &info->signal, sizeof(info->signal));
                    offset += sizeof(info->signal);
                    break;
                case IEEE80211_RADIOTAP_ANTENNA:
                    for (int i = 0; i < info->antenna_count; i++) {
                        memcpy(rtap_data + offset, &info->antennas->antenna_number,
                               sizeof(info->antennas->antenna_number));
                        offset += sizeof(info->antennas->antenna_number);
                        memcpy(rtap_data + offset, &info->antennas->signal, sizeof(info->antennas->signal));
                        offset += sizeof(info->antennas->signal);
                    }
                    break;
                case IEEE80211_RADIOTAP_DBM_ANTNOISE:
                    break;
                case IEEE80211_RADIOTAP_FLAGS:
                    memcpy(rtap_data + offset, &info->flags, sizeof(info->flags));
                    offset += sizeof(info->flags);
                    break;
                case IEEE80211_RADIOTAP_EXT:
                    memcpy(rtap_data + offset, &info->extended_flags, sizeof(info->extended_flags));
                    offset += sizeof(info->extended_flags);
                    break;
                case IEEE80211_RADIOTAP_RX_FLAGS:
                    memcpy(rtap_data + offset, &info->rx_flags, sizeof(info->rx_flags));
                    offset += sizeof(info->rx_flags);
                    break;
                case IEEE80211_RADIOTAP_TX_FLAGS:
                    memcpy(rtap_data + offset, &info->tx_flags, sizeof(info->tx_flags));
                    offset += sizeof(info->tx_flags);
                    break;
                case IEEE80211_RADIOTAP_MCS:
                    memcpy(rtap_data + offset, &info->mcs.known, sizeof(info->mcs.known));
                    offset += sizeof(info->mcs.known);
                    memcpy(rtap_data + offset, &info->mcs.flags, sizeof(info->mcs.flags));
                    offset += sizeof(info->mcs.flags);
                    memcpy(rtap_data + offset, &info->mcs.mcs, sizeof(info->mcs.mcs));
                    offset += sizeof(info->mcs.mcs);
                    break;
                case IEEE80211_RADIOTAP_DBM_TX_POWER:
                    memcpy(rtap_data + offset, &info->tx_power, sizeof(info->tx_power));
                    offset += sizeof(info->tx_power);
                    break;
                case IEEE80211_RADIOTAP_TIMESTAMP:
                    memcpy(rtap_data + offset, &info->timestamp.timestamp, sizeof(info->timestamp.timestamp));
                    offset += sizeof(info->timestamp.timestamp);
                    memcpy(rtap_data + offset, &info->timestamp.accuracy, sizeof(info->timestamp.accuracy));
                    offset += sizeof(info->timestamp.accuracy);
                    memcpy(rtap_data + offset, &info->timestamp.unit, sizeof(info->timestamp.unit));
                    offset += sizeof(info->timestamp.unit);
                    memcpy(rtap_data + offset, &info->timestamp.flags, sizeof(info->timestamp.flags));
                    offset += sizeof(info->timestamp.flags);
                    break;
                case IEEE80211_RADIOTAP_RTS_RETRIES:
                    memcpy(rtap_data + offset, &info->rts_retries, sizeof(info->rts_retries));
                    offset += sizeof(info->rts_retries);
                    break;
                case IEEE80211_RADIOTAP_DATA_RETRIES:
                    memcpy(rtap_data + offset, &info->data_retries, sizeof(info->data_retries));
                    offset += sizeof(info->data_retries);
                    break;
            }
        }

        presence_bit >>= 1;
    }

    rtap_hdr.it_len += offset;

    memcpy(radiotap_header, &rtap_hdr, sizeof(struct ieee80211_radiotap_header));
    memcpy(radiotap_header + sizeof(struct ieee80211_radiotap_header), &rtap_data, offset);

    return rtap_hdr.it_len;
}