View Javadoc
1   /*
2    * Copyright 2020 The Netty Project
3    *
4    * The Netty Project licenses this file to you under the Apache License,
5    * version 2.0 (the "License"); you may not use this file except in compliance
6    * with the License. You may obtain a copy of the License at:
7    *
8    *   https://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13   * License for the specific language governing permissions and limitations
14   * under the License.
15   */
16  package io.netty.handler.codec.quic;
17  
18  final class QuicheNativeStaticallyReferencedJniMethods {
19  
20      static native int quiche_protocol_version();
21      static native int quiche_max_conn_id_len();
22      static native int quiche_shutdown_read();
23      static native int quiche_shutdown_write();
24  
25      static native int quiche_err_done();
26      static native int quiche_err_buffer_too_short();
27      static native int quiche_err_unknown_version();
28      static native int quiche_err_invalid_frame();
29      static native int quiche_err_invalid_packet();
30      static native int quiche_err_invalid_state();
31      static native int quiche_err_invalid_stream_state();
32      static native int quiche_err_invalid_transport_param();
33      static native int quiche_err_crypto_fail();
34      static native int quiche_err_tls_fail();
35      static native int quiche_err_flow_control();
36      static native int quiche_err_stream_limit();
37      static native int quiche_err_final_size();
38      static native int quiche_err_stream_stopped();
39      static native int quiche_err_stream_reset();
40      static native int quiche_err_congestion_control();
41      static native int quiche_err_id_limit();
42      static native int quiche_err_out_of_identifiers();
43      static native int quiche_err_key_update();
44      static native int quiche_err_crypto_buffer_exceeded();
45      static native int quiche_cc_reno();
46      static native int quiche_cc_cubic();
47      static native int quiche_cc_bbr();
48  
49      static native int quicheRecvInfoOffsetofFrom();
50      static native int quicheRecvInfoOffsetofFromLen();
51      static native int quicheRecvInfoOffsetofTo();
52      static native int quicheRecvInfoOffsetofToLen();
53  
54      static native int sizeofQuicheRecvInfo();
55      static native int quicheSendInfoOffsetofTo();
56      static native int quicheSendInfoOffsetofToLen();
57      static native int quicheSendInfoOffsetofFrom();
58      static native int quicheSendInfoOffsetofFromLen();
59  
60      static native int quicheSendInfoOffsetofAt();
61  
62      static native int sizeofQuicheSendInfo();
63  
64      static native int afInet();
65      static native int afInet6();
66      static native int sizeofSockaddrIn();
67      static native int sizeofSockaddrIn6();
68      static native int sockaddrInOffsetofSinFamily();
69      static native int sockaddrInOffsetofSinPort();
70      static native int sockaddrInOffsetofSinAddr();
71      static native int inAddressOffsetofSAddr();
72      static native int sockaddrIn6OffsetofSin6Family();
73      static native int sockaddrIn6OffsetofSin6Port();
74      static native int sockaddrIn6OffsetofSin6Flowinfo();
75      static native int sockaddrIn6OffsetofSin6Addr();
76      static native int sockaddrIn6OffsetofSin6ScopeId();
77      static native int in6AddressOffsetofS6Addr();
78      static native int sizeofSockaddrStorage();
79      static native int sizeofSocklenT();
80      static native int sizeofSizeT();
81  
82      static native int sizeofTimespec();
83      static native int timespecOffsetofTvSec();
84      static native int timespecOffsetofTvNsec();
85      static native int sizeofTimeT();
86      static native int sizeofLong();
87  
88      static native int quiche_path_event_new();
89      static native int quiche_path_event_validated();
90      static native int quiche_path_event_failed_validation();
91      static native int quiche_path_event_closed();
92      static native int quiche_path_event_reused_source_connection_id();
93      static native int quiche_path_event_peer_migrated();
94  
95      private QuicheNativeStaticallyReferencedJniMethods() { }
96  }