<commit_before>/*
 *  Copyright (c) 2014, Facebook, Inc.
 *  All rights reserved.
 *
 *  This source code is licensed under the BSD-style license found in
 *  the LICENSE file in the root directory of this source tree. An
 *  additional grant of patent rights can be found in the PATENTS file
 *  in the same directory.
 *
 */
#pragma once
#include <stdint.h>
#pragma pack(push, 1)

/* The world is little-endian */

enum msg_type {
    MSG_CHANNEL_DATA = 40,
    MSG_CHANNEL_WINDOW,
    MSG_CHANNEL_CLOSE,
    MSG_CHILD_EXIT,
    MSG_ERROR,
    MSG_WINDOW_SIZE,
    MSG_SHEX_HELLO,
    MSG_CMDLINE_ARGUMENT,
    MSG_CMDLINE_ARGUMENT_JUMBO,
    MSG_CMDLINE_DEFAULT_SH,
    MSG_CMDLINE_DEFAULT_SH_LOGIN,
    MSG_EXEC_AS_ROOT,
    MSG_EXEC_AS_USER,
    MSG_CHDIR,
    MSG_REBIND_TO_UNIX_SOCKET,
    MSG_REBIND_TO_TCP_SOCKET,
    MSG_LISTENING_ON_SOCKET,
};

#define MSG_MAX_SIZE UINT16_MAX

struct msg {
    uint16_t size;
    uint16_t type;
};

struct msg_channel_data {
    struct msg msg;
    uint32_t channel;
    char data[0];
};

struct msg_channel_window {
    struct msg msg;
    uint32_t channel;
    uint32_t window_delta;
};

struct msg_channel_close {
    struct msg msg;
    uint32_t channel;
};

struct msg_error {
    struct msg msg;
    char text[0];
};

struct msg_child_exit {
    struct msg msg;
    uint8_t exit_status;
};

struct window_size {
    uint16_t row;
    uint16_t col;
    uint16_t xpixel;
    uint16_t ypixel;
};

struct msg_window_size {
    struct msg msg;
    struct window_size ws;
};

struct term_control {
    uint8_t value;
    char name[9];
};

struct stream_information {
    uint32_t bufsz;<commit_msg>Reduce width of channel ID on wire from 32 bits to 8<commit_after>/*
 *  Copyright (c) 2014, Facebook, Inc.
 *  All rights reserved.
 *
 *  This source code is licensed under the BSD-style license found in
 *  the LICENSE file in the root directory of this source tree. An
 *  additional grant of patent rights can be found in the PATENTS file
 *  in the same directory.
 *
 */
#pragma once
#include <stdint.h>
#pragma pack(push, 1)

/* The world is little-endian */

enum msg_type {
    MSG_CHANNEL_DATA = 40,
    MSG_CHANNEL_WINDOW,
    MSG_CHANNEL_CLOSE,
    MSG_CHILD_EXIT,
    MSG_ERROR,
    MSG_WINDOW_SIZE,
    MSG_SHEX_HELLO,
    MSG_CMDLINE_ARGUMENT,
    MSG_CMDLINE_ARGUMENT_JUMBO,
    MSG_CMDLINE_DEFAULT_SH,
    MSG_CMDLINE_DEFAULT_SH_LOGIN,
    MSG_EXEC_AS_ROOT,
    MSG_EXEC_AS_USER,
    MSG_CHDIR,
    MSG_REBIND_TO_UNIX_SOCKET,
    MSG_REBIND_TO_TCP_SOCKET,
    MSG_LISTENING_ON_SOCKET,
};

#define MSG_MAX_SIZE UINT16_MAX

struct msg {
    uint16_t size;
    uint16_t type;
};

struct msg_channel_data {
    struct msg msg;
    uint8_t channel;
    char data[0];
};

struct msg_channel_window {
    struct msg msg;
    uint32_t window_delta;
    uint8_t channel;
};

struct msg_channel_close {
    struct msg msg;
    uint8_t channel;
};

struct msg_error {
    struct msg msg;
    char text[0];
};

struct msg_child_exit {
    struct msg msg;
    uint8_t exit_status;
};

struct window_size {
    uint16_t row;
    uint16_t col;
    uint16_t xpixel;
    uint16_t ypixel;
};

struct msg_window_size {
    struct msg msg;
    struct window_size ws;
};

struct term_control {
    uint8_t value;
    char name[9];
};

struct stream_information {
    uint32_t bufsz;
{'fraction_non_alphanumeric': 0.07043949428055388, 'fraction_numerical': 0.021673690547862733, 'mean_word_length': 3.2385204081632653, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2023813', 'n_tokens_mistral': 1299, 'n_tokens_neox': 1229, 'n_words': 320}