This struct is saved into connections_map to allow finding the right channel given an IP packet from TUN. More...
Data Fields | |
struct GNUNET_CADET_Channel * | channel |
Cadet channel that is used for this connection. More... | |
struct GNUNET_PeerIdentity | peer |
Who is the other end of this channel. More... | |
int | is_dns |
GNUNET_NO if this is a channel for TCP/UDP, GNUNET_YES if this is a channel for DNS, GNUNET_SYSERR if the channel is not yet initialized. More... | |
union { | |
struct { | |
struct GNUNET_CONTAINER_HeapNode * heap_node | |
Heap node for this state in the connections_heap. More... | |
struct GNUNET_HashCode state_key | |
Key this state has in the connections_map. More... | |
struct LocalService * serv | |
Associated service record, or NULL for no service. More... | |
struct RedirectInformation ri | |
Primary redirection information for this connection. More... | |
} tcp_udp | |
struct { | |
struct GNUNET_DNSSTUB_RequestSocket * rs | |
Socket we are using to transmit this request (must match if we receive a response). More... | |
uint16_t original_id | |
Original DNS request ID as used by the client. More... | |
uint16_t my_id | |
DNS request ID that we used for forwarding. More... | |
} dns | |
} | specifics |
struct GNUNET_REGEX_Search * | search |
Active query with REGEX to locate exit. More... | |
struct ChannelMessageQueueEntry * | tmq_head |
Head of list of messages scheduled for transmission. More... | |
struct ChannelMessageQueueEntry * | tmq_tail |
Tail of list of messages scheduled for transmission. More... | |
struct DestinationEntry | destination |
Destination to which this channel leads. More... | |
int | af |
Address family used for this channel on the local TUN interface. More... | |
int | is_established |
Is this channel new (GNUNET_NO), or did we exchange messages with the other side already (GNUNET_YES)? More... | |
unsigned int | tmq_length |
Length of the doubly linked 'tmq_head/tmq_tail' list. More... | |
uint8_t | protocol |
IPPROTO_TCP or IPPROTO_UDP once bound. More... | |
union { | |
struct in_addr v4 | |
Address if af is AF_INET. More... | |
struct in6_addr v6 | |
Address if af is AF_INET6. More... | |
} | source_ip |
IP address of the source on our end, initially uninitialized. More... | |
union { | |
struct in_addr v4 | |
Address if af is AF_INET. More... | |
struct in6_addr v6 | |
Address if af is AF_INET6. More... | |
} | destination_ip |
Destination IP address used by the source on our end (this is the IP that we pick freely within the VPN's channel IP range). More... | |
uint16_t | source_port |
Source port used by the sender on our end; 0 for uninitialized. More... | |
uint16_t | destination_port |
Destination port used by the sender on our end; 0 for uninitialized. More... | |
This struct is saved into connections_map to allow finding the right channel given an IP packet from TUN.
State we keep for each of our channels.
It is also associated with the channel's closure so we can find it again for the next message from the channel.
Definition at line 199 of file gnunet-daemon-exit.c.
struct GNUNET_CADET_Channel * ChannelState::channel |
Cadet channel that is used for this connection.
Information about the channel to use, NULL if no channel is available right now.
Definition at line 204 of file gnunet-daemon-exit.c.
Referenced by channel_cleaner(), create_channel_to_destination(), free_channel_state(), handle_dns_request(), handle_icmp_back(), handle_regex_result(), handle_tcp_back(), handle_udp_back(), new_channel(), new_service_channel(), process_dns_result(), route_packet(), send_packet_to_cadet_channel(), send_to_channel(), and setup_state_record().
struct GNUNET_PeerIdentity ChannelState::peer |
Who is the other end of this channel.
FIXME is this needed? Only used for debugging messages
Definition at line 204 of file gnunet-daemon-exit.c.
Referenced by gnunet_testing.StatisticsCondition::check(), gnunet_testing.EqualStatisticsCondition::check(), gnunet_testing.StatisticsCondition::evaluate(), gnunet_testing.EqualStatisticsCondition::evaluate(), new_channel(), and new_service_channel().
int ChannelState::is_dns |
GNUNET_NO if this is a channel for TCP/UDP, GNUNET_YES if this is a channel for DNS, GNUNET_SYSERR if the channel is not yet initialized.
Definition at line 217 of file gnunet-daemon-exit.c.
Referenced by check_dns_request(), clean_channel(), handle_dns_request(), and new_channel().
struct GNUNET_CONTAINER_HeapNode * ChannelState::heap_node |
Heap node for this state in the connections_heap.
Entry for this entry in the channel_heap, NULL as long as this channel state is not fully bound.
Definition at line 226 of file gnunet-daemon-exit.c.
Referenced by check_icmp_back(), check_tcp_back(), check_udp_back(), free_channel_state(), handle_icmp_back(), handle_tcp_back(), handle_udp_back(), and route_packet().
struct GNUNET_HashCode ChannelState::state_key |
Key this state has in the connections_map.
Definition at line 226 of file gnunet-daemon-exit.c.
Referenced by setup_state_record().
struct LocalService* ChannelState::serv |
Associated service record, or NULL for no service.
Definition at line 236 of file gnunet-daemon-exit.c.
struct RedirectInformation ChannelState::ri |
Primary redirection information for this connection.
Definition at line 236 of file gnunet-daemon-exit.c.
Referenced by get_redirect_state().
struct { ... } ChannelState::tcp_udp |
Referenced by clean_channel(), new_service_channel(), and setup_state_record().
struct GNUNET_DNSSTUB_RequestSocket* ChannelState::rs |
Socket we are using to transmit this request (must match if we receive a response).
Definition at line 250 of file gnunet-daemon-exit.c.
uint16_t ChannelState::original_id |
Original DNS request ID as used by the client.
Definition at line 255 of file gnunet-daemon-exit.c.
uint16_t ChannelState::my_id |
DNS request ID that we used for forwarding.
Definition at line 260 of file gnunet-daemon-exit.c.
struct { ... } ChannelState::dns |
Referenced by clean_channel(), handle_dns_request(), and process_dns_result().
union { ... } ChannelState::specifics |
Referenced by clean_channel(), handle_dns_request(), new_service_channel(), process_dns_result(), and setup_state_record().
struct GNUNET_REGEX_Search* ChannelState::search |
Active query with REGEX to locate exit.
Definition at line 210 of file gnunet-service-vpn.c.
Referenced by create_channel_to_destination(), free_channel_state(), handle_regex_result(), and route_packet().
struct ChannelMessageQueueEntry* ChannelState::tmq_head |
Head of list of messages scheduled for transmission.
Definition at line 221 of file gnunet-service-vpn.c.
Referenced by free_channel_state().
struct ChannelMessageQueueEntry* ChannelState::tmq_tail |
Tail of list of messages scheduled for transmission.
Definition at line 226 of file gnunet-service-vpn.c.
Referenced by free_channel_state().
struct DestinationEntry ChannelState::destination |
Destination to which this channel leads.
Note that this struct is NOT in the destination_map (but a local copy) and that the 'heap_node' should always be NULL.
Definition at line 226 of file gnunet-service-vpn.c.
Referenced by channel_cleaner(), cleanup_channel(), create_channel_to_destination(), expire_channel(), free_channel_state(), handle_regex_result(), and route_packet().
int ChannelState::af |
Address family used for this channel on the local TUN interface.
Definition at line 239 of file gnunet-service-vpn.c.
Referenced by check_icmp_back(), check_udp_back(), create_channel_to_destination(), free_channel_state(), get_redirect_state(), handle_icmp_back(), handle_regex_result(), handle_tcp_back(), handle_udp_back(), and route_packet().
int ChannelState::is_established |
Is this channel new (GNUNET_NO), or did we exchange messages with the other side already (GNUNET_YES)?
Definition at line 245 of file gnunet-service-vpn.c.
Referenced by route_packet().
unsigned int ChannelState::tmq_length |
Length of the doubly linked 'tmq_head/tmq_tail' list.
Definition at line 250 of file gnunet-service-vpn.c.
Referenced by free_channel_state().
uint8_t ChannelState::protocol |
IPPROTO_TCP or IPPROTO_UDP once bound.
Definition at line 255 of file gnunet-service-vpn.c.
Referenced by free_channel_state(), get_redirect_state(), make_up_icmpv4_payload(), make_up_icmpv6_payload(), prepare_ipv4_packet(), and route_packet().
struct in_addr ChannelState::v4 |
Address if af is AF_INET.
Definition at line 298 of file gnunet-service-vpn.c.
Referenced by handle_icmp_back(), handle_tcp_back(), handle_udp_back(), make_up_icmpv4_payload(), and route_packet().
struct in6_addr ChannelState::v6 |
Address if af is AF_INET6.
Definition at line 298 of file gnunet-service-vpn.c.
Referenced by handle_icmp_back(), handle_tcp_back(), handle_udp_back(), make_up_icmpv6_payload(), and route_packet().
union { ... } ChannelState::source_ip |
IP address of the source on our end, initially uninitialized.
Referenced by free_channel_state(), handle_icmp_back(), handle_tcp_back(), handle_udp_back(), make_up_icmpv4_payload(), make_up_icmpv6_payload(), and route_packet().
union { ... } ChannelState::destination_ip |
Destination IP address used by the source on our end (this is the IP that we pick freely within the VPN's channel IP range).
Referenced by free_channel_state(), handle_icmp_back(), handle_tcp_back(), handle_udp_back(), make_up_icmpv4_payload(), make_up_icmpv6_payload(), and route_packet().
uint16_t ChannelState::source_port |
Source port used by the sender on our end; 0 for uninitialized.
Definition at line 293 of file gnunet-service-vpn.c.
Referenced by free_channel_state(), handle_tcp_back(), handle_udp_back(), make_up_icmpv4_payload(), make_up_icmpv6_payload(), and route_packet().
uint16_t ChannelState::destination_port |
Destination port used by the sender on our end; 0 for uninitialized.
Definition at line 298 of file gnunet-service-vpn.c.
Referenced by create_channel_to_destination(), free_channel_state(), get_redirect_state(), handle_tcp_back(), handle_udp_back(), make_up_icmpv4_payload(), make_up_icmpv6_payload(), and route_packet().