exynos-linux-stable/include/linux/if_pppox.h
Greg Kroah-Hartman 94c1fcc8e4 This is the 4.9.189 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl1P7H4ACgkQONu9yGCS
 aT4ajw//URV78175uHcZ6XC5kU4FSznr3tBbUKSmxL2SWRm8looA1iFLcItm3WTg
 jbV/9qETeGllRGuaLNLgG4AzSENh02KWjvlNk/WqpKOanjB+N/K0jnSZ3t2xqysh
 UgRN1sjYiX/kYbfbKyqXev+KrEsFDHqjrkVzd4vJEbhdCm6KOSQI835IbAcrST/w
 8NKTRinvU+OjHTIqTyjoh6h+qmJnc2HykZGGmBolZE2NmaqCagOo+eGKwd89YOWr
 JOV1DWoTRLrVRlR47ZoQ3zE62dpCgPJJpaJMlQkJRJmqLntu3rzvvQrgNSrcFT/2
 cUcnle14SXeMQb00HLBxEN1zhYkLj2QsEBd1MwASKpLjdCtwhxLAKZ7It3dNbAJ7
 N3kkjAg+4PHwHrWIvlfhwl85hrrz0QuFTRMWT6d6r/msyYhjxptTFCgiRq6pX29u
 lo9BqRSKUwwGrZlKuI7wfrafH+r6ujxzgMlAd0/ScgmrRhoWByX3luIaUlIEk5iF
 0y9KxXbQmlJCw/jOtTiw5VYlK8mvLQdpMEx5cuvK7tXuN5A2Cqc5ltjBIMo6ZBlK
 prRUJu8/GoKjWGBXYQmk6zJo8QHAh/sO6MyQXlLCRq8hHEscRX0sWnBxH6hAhsmc
 1DFb+YVdYxWZk63D3aHncNbs6GXHR4MB+Yoll8w7alH0O7jDP4I=
 =F4Ha
 -----END PGP SIGNATURE-----

Merge 4.9.189 into android-4.9-q

Changes in 4.9.189
	scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure
	ARM: dts: Add pinmuxing for i2c2 and i2c3 for LogicPD SOM-LV
	ARM: dts: Add pinmuxing for i2c2 and i2c3 for LogicPD torpedo
	ARM: dts: logicpd-som-lv: Fix Audio Mute
	arm64: cpufeature: Fix CTR_EL0 field definitions
	arm64: cpufeature: Fix feature comparison for CTR_EL0.{CWG,ERG}
	tcp: be more careful in tcp_fragment()
	HID: wacom: fix bit shift for Cintiq Companion 2
	HID: Add quirk for HP X1200 PIXART OEM mouse
	RDMA: Directly cast the sockaddr union to sockaddr
	IB: directly cast the sockaddr union to aockaddr
	objtool: Add machine_real_restart() to the noreturn list
	objtool: Add rewind_stack_do_exit() to the noreturn list
	libceph: use kbasename() and kill ceph_file_part()
	atm: iphase: Fix Spectre v1 vulnerability
	net: bridge: delete local fdb on device init failure
	net: bridge: mcast: don't delete permanent entries when fast leave is enabled
	net: fix ifindex collision during namespace removal
	net/mlx5: Use reversed order when unregister devices
	net: sched: Fix a possible null-pointer dereference in dequeue_func()
	tipc: compat: allow tipc commands without arguments
	compat_ioctl: pppoe: fix PPPOEIOCSFWD handling
	ip6_tunnel: fix possible use-after-free on xmit
	ife: error out when nla attributes are empty
	bnx2x: Disable multi-cos feature.
	block: blk_init_allocated_queue() set q->fq as NULL in the fail case
	spi: bcm2835: Fix 3-wire mode if DMA is enabled
	x86: cpufeatures: Sort feature word 7
	x86/speculation: Prepare entry code for Spectre v1 swapgs mitigations
	x86/speculation: Enable Spectre v1 swapgs mitigations
	x86/entry/64: Use JMP instead of JMPQ
	x86/speculation/swapgs: Exclude ATOMs from speculation through SWAPGS
	Linux 4.9.189

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2019-08-11 15:30:44 +02:00

121 lines
3.5 KiB
C

/***************************************************************************
* Linux PPP over X - Generic PPP transport layer sockets
* Linux PPP over Ethernet (PPPoE) Socket Implementation (RFC 2516)
*
* This file supplies definitions required by the PPP over Ethernet driver
* (pppox.c). All version information wrt this file is located in pppox.c
*
* License:
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
*/
#ifndef __LINUX_IF_PPPOX_H
#define __LINUX_IF_PPPOX_H
#include <linux/if.h>
#include <linux/netdevice.h>
#include <linux/ppp_channel.h>
#include <linux/skbuff.h>
#include <linux/workqueue.h>
#include <uapi/linux/if_pppox.h>
static inline struct pppoe_hdr *pppoe_hdr(const struct sk_buff *skb)
{
return (struct pppoe_hdr *)skb_network_header(skb);
}
struct pppoe_opt {
struct net_device *dev; /* device associated with socket*/
int ifindex; /* ifindex of device associated with socket */
struct pppoe_addr pa; /* what this socket is bound to*/
struct sockaddr_pppox relay; /* what socket data will be
relayed to (PPPoE relaying) */
struct work_struct padt_work;/* Work item for handling PADT */
};
struct pptp_opt {
struct pptp_addr src_addr;
struct pptp_addr dst_addr;
u32 ack_sent, ack_recv;
u32 seq_sent, seq_recv;
int ppp_flags;
};
struct pppolac_opt {
__u32 local;
__u32 remote;
__u32 recv_sequence;
__u32 xmit_sequence;
atomic_t sequencing;
int (*backlog_rcv)(struct sock *sk_udp, struct sk_buff *skb);
};
struct pppopns_opt {
__u16 local;
__u16 remote;
__u32 recv_sequence;
__u32 xmit_sequence;
void (*data_ready)(struct sock *sk_raw);
int (*backlog_rcv)(struct sock *sk_raw, struct sk_buff *skb);
};
#include <net/sock.h>
struct pppox_sock {
/* struct sock must be the first member of pppox_sock */
struct sock sk;
struct ppp_channel chan;
struct pppox_sock *next; /* for hash table */
union {
struct pppoe_opt pppoe;
struct pptp_opt pptp;
struct pppolac_opt lac;
struct pppopns_opt pns;
} proto;
__be16 num;
};
#define pppoe_dev proto.pppoe.dev
#define pppoe_ifindex proto.pppoe.ifindex
#define pppoe_pa proto.pppoe.pa
#define pppoe_relay proto.pppoe.relay
static inline struct pppox_sock *pppox_sk(struct sock *sk)
{
return (struct pppox_sock *)sk;
}
static inline struct sock *sk_pppox(struct pppox_sock *po)
{
return (struct sock *)po;
}
struct module;
struct pppox_proto {
int (*create)(struct net *net, struct socket *sock, int kern);
int (*ioctl)(struct socket *sock, unsigned int cmd,
unsigned long arg);
struct module *owner;
};
extern int register_pppox_proto(int proto_num, const struct pppox_proto *pp);
extern void unregister_pppox_proto(int proto_num);
extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */
extern int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
extern int pppox_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
#define PPPOEIOCSFWD32 _IOW(0xB1 ,0, compat_size_t)
/* PPPoX socket states */
enum {
PPPOX_NONE = 0, /* initial state */
PPPOX_CONNECTED = 1, /* connection established ==TCP_ESTABLISHED */
PPPOX_BOUND = 2, /* bound to ppp device */
PPPOX_RELAY = 4, /* forwarding is enabled */
PPPOX_DEAD = 16 /* dead, useless, please clean me up!*/
};
#endif /* !(__LINUX_IF_PPPOX_H) */