/** * struct ovpn_peer - the main remote peer object * @ovpn: main openvpn instance this peer belongs to * @dev_tracker: reference tracker for associated dev * @id: unique identifier * @vpn_addrs: IP addresses assigned over the tunnel * @vpn_addrs.ipv4: IPv4 assigned to peer on the tunnel * @vpn_addrs.ipv6: IPv6 assigned to peer on the tunnel * @hash_entry_id: entry in the peer ID hashtable * @hash_entry_addr4: entry in the peer IPv4 hashtable * @hash_entry_addr6: entry in the peer IPv6 hashtable * @hash_entry_transp_addr: entry in the peer transport address hashtable * @sock: the socket being used to talk to this peer * @tcp: keeps track of TCP specific state * @tcp.strp: stream parser context (TCP only) * @tcp.user_queue: received packets that have to go to userspace (TCP only) * @tcp.out_queue: packets on hold while socket is taken by user (TCP only) * @tcp.tx_in_progress: true if TX is already ongoing (TCP only) * @tcp.out_msg.skb: packet scheduled for sending (TCP only) * @tcp.out_msg.offset: offset where next send should start (TCP only) * @tcp.out_msg.len: remaining data to send within packet (TCP only) * @tcp.sk_cb.sk_data_ready: pointer to original cb (TCP only) * @tcp.sk_cb.sk_write_space: pointer to original cb (TCP only) * @tcp.sk_cb.prot: pointer to original prot object (TCP only) * @tcp.sk_cb.ops: pointer to the original prot_ops object (TCP only) * @crypto: the crypto configuration (ciphers, keys, etc..) * @dst_cache: cache for dst_entry used to send to peer * @bind: remote peer binding * @keepalive_interval: seconds after which a new keepalive should be sent * @keepalive_xmit_exp: future timestamp when next keepalive should be sent * @last_sent: timestamp of the last successfully sent packet * @keepalive_timeout: seconds after which an inactive peer is considered dead * @keepalive_recv_exp: future timestamp when the peer should expire * @last_recv: timestamp of the last authenticated received packet * @vpn_stats: per-peer in-VPN TX/RX stats * @link_stats: per-peer link/transport TX/RX stats * @delete_reason: why peer was deleted (i.e. timeout, transport error, ..) * @lock: protects binding to peer (bind) and keepalive* fields * @refcount: reference counter * @rcu: used to free peer in an RCU safe way * @release_entry: entry for the socket release list * @keepalive_work: used to schedule keepalive sending
*/ struct ovpn_peer { struct ovpn_priv *ovpn;
netdevice_tracker dev_tracker;
u32 id; struct { struct in_addr ipv4; struct in6_addr ipv6;
} vpn_addrs; struct hlist_node hash_entry_id; struct hlist_nulls_node hash_entry_addr4; struct hlist_nulls_node hash_entry_addr6; struct hlist_nulls_node hash_entry_transp_addr; struct ovpn_socket __rcu *sock;
/** * ovpn_peer_hold - increase reference counter * @peer: the peer whose counter should be increased * * Return: true if the counter was increased or false if it was zero already
*/ staticinlinebool ovpn_peer_hold(struct ovpn_peer *peer)
{ return kref_get_unless_zero(&peer->refcount);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.