--- zzzz-none-000/linux-5.4.213/include/linux/if_pppox.h 2022-09-15 10:04:56.000000000 +0000 +++ alder-5690pro-762/linux-5.4.213/include/linux/if_pppox.h 2024-08-14 09:02:08.000000000 +0000 @@ -1,13 +1,14 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ /*************************************************************************** * Linux PPP over X - Generic PPP transport layer sockets - * Linux PPP over Ethernet (PPPoE) Socket Implementation (RFC 2516) + * 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: */ + #ifndef __LINUX_IF_PPPOX_H #define __LINUX_IF_PPPOX_H @@ -38,6 +39,7 @@ u32 ack_sent, ack_recv; u32 seq_sent, seq_recv; int ppp_flags; + bool pptp_offload_mode; }; #include @@ -93,4 +95,49 @@ PPPOX_DEAD = 16 /* dead, useless, please clean me up!*/ }; +/* + * PPPoE Channel specific operations + */ +struct pppoe_channel_ops { + /* Must be first - general to all PPP channels */ + struct ppp_channel_ops ops; + int (*get_addressing)(struct ppp_channel *, struct pppoe_opt *); +}; + +/* PPTP client callback */ +typedef int (*pptp_gre_seq_offload_callback_t)(struct sk_buff *skb, + struct net_device *pptp_dev); + +/* Return PPPoE channel specific addressing information */ +extern int pppoe_channel_addressing_get(struct ppp_channel *chan, + struct pppoe_opt *addressing); + +/* Lookup PPTP session info and return PPTP session using sip, dip and local call id */ +extern int pptp_session_find_by_src_callid(struct pptp_opt *opt, __be16 src_call_id, + __be32 daddr, __be32 saddr); + +/* Lookup PPTP session info and return PPTP session using dip and peer call id */ +extern int pptp_session_find(struct pptp_opt *opt, __be16 peer_call_id, + __be32 peer_ip_addr); + +/* Return PPTP session information given the channel */ +extern void pptp_channel_addressing_get(struct pptp_opt *opt, + struct ppp_channel *chan); + +/* Enable the PPTP session offload flag */ +extern int pptp_session_enable_offload_mode(__be16 peer_call_id, + __be32 peer_ip_addr); + +/* Disable the PPTP session offload flag */ +extern int pptp_session_disable_offload_mode(__be16 peer_call_id, + __be32 peer_ip_addr); + +/* Register the PPTP GRE packets sequence number offload callback */ +extern int +pptp_register_gre_seq_offload_callback(pptp_gre_seq_offload_callback_t + pptp_client_cb); + +/* Unregister the PPTP GRE packets sequence number offload callback */ +extern void pptp_unregister_gre_seq_offload_callback(void); + #endif /* !(__LINUX_IF_PPPOX_H) */