161
162 /* Internal udp control structure, one per open stream */
163 typedef struct udp_s {
164 /*
165 * The addresses and ports in the conn_t and udp_state are protected by
166 * conn_lock and the fanout lock i.e. uf_lock. Need both locks to change
167 * the fields, either lock is sufficient for reading the field.
168 * conn_lock also protects the content of udp_t.
169 */
170 uint32_t udp_state; /* TPI state */
171
172 ip_pkt_t udp_recv_ipp; /* Used for IPv4 options received */
173
174 /* Written to only once at the time of opening the endpoint */
175 conn_t *udp_connp;
176
177 uint32_t
178 udp_issocket : 1, /* socket mode; sockfs is on top */
179 udp_nat_t_endpoint : 1, /* UDP_NAT_T_ENDPOINT option */
180 udp_rcvhdr : 1, /* UDP_RCVHDR option */
181
182 udp_pad_to_bit_31 : 29;
183
184 /* Following 2 fields protected by the uf_lock */
185 struct udp_s *udp_bind_hash; /* Bind hash chain */
186 struct udp_s **udp_ptpbhn; /* Pointer to previous bind hash next. */
187
188 kmutex_t udp_recv_lock; /* recv lock */
189 size_t udp_rcv_disply_hiwat; /* user's view of rcvbuf */
190 size_t udp_rcv_hiwat; /* receive high watermark */
191
192 /* Set at open time and never changed */
193 udp_stack_t *udp_us; /* Stack instance for zone */
194
195 int udp_delayed_error;
196 mblk_t *udp_fallback_queue_head;
197 mblk_t *udp_fallback_queue_tail;
198 struct sockaddr_storage udp_delayed_addr;
199 } udp_t;
200
201 /* UDP Protocol header aligned */
202 typedef struct udpahdr_s {
|
161
162 /* Internal udp control structure, one per open stream */
163 typedef struct udp_s {
164 /*
165 * The addresses and ports in the conn_t and udp_state are protected by
166 * conn_lock and the fanout lock i.e. uf_lock. Need both locks to change
167 * the fields, either lock is sufficient for reading the field.
168 * conn_lock also protects the content of udp_t.
169 */
170 uint32_t udp_state; /* TPI state */
171
172 ip_pkt_t udp_recv_ipp; /* Used for IPv4 options received */
173
174 /* Written to only once at the time of opening the endpoint */
175 conn_t *udp_connp;
176
177 uint32_t
178 udp_issocket : 1, /* socket mode; sockfs is on top */
179 udp_nat_t_endpoint : 1, /* UDP_NAT_T_ENDPOINT option */
180 udp_rcvhdr : 1, /* UDP_RCVHDR option */
181 udp_snd_to_conn: 1, /* UDP_SND_TO_CONNECTED option */
182
183 udp_pad_to_bit_31 : 28;
184
185 /* Following 2 fields protected by the uf_lock */
186 struct udp_s *udp_bind_hash; /* Bind hash chain */
187 struct udp_s **udp_ptpbhn; /* Pointer to previous bind hash next. */
188
189 kmutex_t udp_recv_lock; /* recv lock */
190 size_t udp_rcv_disply_hiwat; /* user's view of rcvbuf */
191 size_t udp_rcv_hiwat; /* receive high watermark */
192
193 /* Set at open time and never changed */
194 udp_stack_t *udp_us; /* Stack instance for zone */
195
196 int udp_delayed_error;
197 mblk_t *udp_fallback_queue_head;
198 mblk_t *udp_fallback_queue_tail;
199 struct sockaddr_storage udp_delayed_addr;
200 } udp_t;
201
202 /* UDP Protocol header aligned */
203 typedef struct udpahdr_s {
|