<commit_before>#pragma once

#include <osmocom/core/select.h>
#include <osmocom/core/msgb.h>
#include "osmo_mcast_sock.h"

#define VIRT_UM_MSGB_SIZE	256
#define DEFAULT_MS_MCAST_GROUP "172.16.58.3"
#define DEFAULT_MS_MCAST_PORT 4729 /* IANA-registered port for GSMTAP */
#define DEFAULT_BTS_MCAST_GROUP "192.168.3.11"
#define DEFAULT_BTS_MCAST_PORT 4729 /* IANA-registered port for GSMTAP */

struct virt_um_inst {
	void *priv;
	struct mcast_bidir_sock *mcast_sock;
	void (*recv_cb)(struct virt_um_inst *vui, struct msgb *msg);
};

struct virt_um_inst *virt_um_init(
                void *ctx, char *tx_mcast_group, uint16_t tx_mcast_port,
                char *rx_mcast_group, uint16_t rx_mcast_port,
                void (*recv_cb)(struct virt_um_inst *vui, struct msgb *msg));

void virt_um_destroy(struct virt_um_inst *vui);

int virt_um_write_msg(struct virt_um_inst *vui, struct msgb *msg);<commit_msg>VIRT-PHY: Use IPv4 multicast groups for private / local scope<commit_after>#pragma once

#include <osmocom/core/select.h>
#include <osmocom/core/msgb.h>
#include "osmo_mcast_sock.h"

/* We use multicast group addresses from the 192.168.3.11/14 rage, as
 * those are designated by RFC2365 as "IPv4 Organization Local Scope,
 * "... the space from which an organization should allocate sub-
 *  ranges when defining scopes for private use." */

#define VIRT_UM_MSGB_SIZE	256
#define DEFAULT_MS_MCAST_GROUP	"172.16.31.10"
#define DEFAULT_MS_MCAST_PORT 4729 /* IANA-registered port for GSMTAP */
#define DEFAULT_BTS_MCAST_GROUP	"192.168.3.11"
#define DEFAULT_BTS_MCAST_PORT 4729 /* IANA-registered port for GSMTAP */

struct virt_um_inst {
	void *priv;
	struct mcast_bidir_sock *mcast_sock;
	void (*recv_cb)(struct virt_um_inst *vui, struct msgb *msg);
};

struct virt_um_inst *virt_um_init(
                void *ctx, char *tx_mcast_group, uint16_t tx_mcast_port,
                char *rx_mcast_group, uint16_t rx_mcast_port,
                void (*recv_cb)(struct virt_um_inst *vui, struct msgb *msg));

void virt_um_destroy(struct virt_um_inst *vui);

int virt_um_write_msg(struct virt_um_inst *vui, struct msgb *msg);
{'fraction_non_alphanumeric': 0.09694117647058824, 'fraction_numerical': 0.038588235294117645, 'mean_word_length': 4.536458333333333, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 5, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4605863', 'n_tokens_mistral': 860, 'n_tokens_neox': 786, 'n_words': 195}