linux/drivers/usb/gadget/function/rndis.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * RNDIS	Definitions for Remote NDIS
 *
 * Authors:	Benedikt Spranger, Pengutronix
 *		Robert Schwebel, Pengutronix
 *
 *		This software was originally developed in conformance with
 *		Microsoft's Remote NDIS Specification License Agreement.
 */

#ifndef _LINUX_RNDIS_H
#define _LINUX_RNDIS_H

#include <linux/rndis.h>
#include "u_ether.h"
#include "ndis.h"

#define RNDIS_MAXIMUM_FRAME_SIZE
#define RNDIS_MAX_TOTAL_SIZE

rndis_init_msg_type;

rndis_init_cmplt_type;

rndis_halt_msg_type;

rndis_query_msg_type;

rndis_query_cmplt_type;

rndis_set_msg_type;

rndis_set_cmplt_type;

rndis_reset_msg_type;

rndis_reset_cmplt_type;

rndis_indicate_status_msg_type;

rndis_keepalive_msg_type;

rndis_keepalive_cmplt_type;

struct rndis_packet_msg_type {} __attribute__ ((packed));

struct rndis_config_parameter {};

/* implementation specific */
enum rndis_state {};

rndis_resp_t;

rndis_params;

/* RNDIS Message parser and other useless functions */
int  rndis_msg_parser(struct rndis_params *params, u8 *buf);
struct rndis_params *rndis_register(void (*resp_avail)(void *v), void *v);
void rndis_deregister(struct rndis_params *params);
int  rndis_set_param_dev(struct rndis_params *params, struct net_device *dev,
			 u16 *cdc_filter);
int  rndis_set_param_vendor(struct rndis_params *params, u32 vendorID,
			    const char *vendorDescr);
int  rndis_set_param_medium(struct rndis_params *params, u32 medium,
			     u32 speed);
void rndis_add_hdr(struct sk_buff *skb);
int rndis_rm_hdr(struct gether *port, struct sk_buff *skb,
			struct sk_buff_head *list);
u8   *rndis_get_next_response(struct rndis_params *params, u32 *length);
void rndis_free_response(struct rndis_params *params, u8 *buf);

void rndis_uninit(struct rndis_params *params);
int  rndis_signal_connect(struct rndis_params *params);
int  rndis_signal_disconnect(struct rndis_params *params);
int  rndis_state(struct rndis_params *params);
extern void rndis_set_host_mac(struct rndis_params *params, const u8 *addr);

#endif  /* _LINUX_RNDIS_H */