outside_network.h (307729) | outside_network.h (356345) |
---|---|
1/* 2 * services/outside_network.h - listen to answers from the network 3 * 4 * Copyright (c) 2007, NLnet Labs. All rights reserved. 5 * 6 * This software is open source. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 45 unchanged lines hidden (view full) --- 54struct waiting_udp; 55struct infra_cache; 56struct port_comm; 57struct port_if; 58struct sldns_buffer; 59struct serviced_query; 60struct dt_env; 61struct edns_option; | 1/* 2 * services/outside_network.h - listen to answers from the network 3 * 4 * Copyright (c) 2007, NLnet Labs. All rights reserved. 5 * 6 * This software is open source. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 45 unchanged lines hidden (view full) --- 54struct waiting_udp; 55struct infra_cache; 56struct port_comm; 57struct port_if; 58struct sldns_buffer; 59struct serviced_query; 60struct dt_env; 61struct edns_option; |
62struct module_env; 63struct module_qstate; 64struct query_info; |
|
62 63/** 64 * Send queries to outside servers and wait for answers from servers. 65 * Contains answer-listen sockets. 66 */ 67struct outside_network { 68 /** Base for select calls */ 69 struct comm_base* base; --- 45 unchanged lines hidden (view full) --- 115 int num_ip6; 116 117 /** pending udp queries waiting to be sent out, waiting for fd */ 118 struct pending* udp_wait_first; 119 /** last pending udp query in list */ 120 struct pending* udp_wait_last; 121 122 /** pending udp answers. sorted by id, addr */ | 65 66/** 67 * Send queries to outside servers and wait for answers from servers. 68 * Contains answer-listen sockets. 69 */ 70struct outside_network { 71 /** Base for select calls */ 72 struct comm_base* base; --- 45 unchanged lines hidden (view full) --- 118 int num_ip6; 119 120 /** pending udp queries waiting to be sent out, waiting for fd */ 121 struct pending* udp_wait_first; 122 /** last pending udp query in list */ 123 struct pending* udp_wait_last; 124 125 /** pending udp answers. sorted by id, addr */ |
123 rbtree_t* pending; | 126 rbtree_type* pending; |
124 /** serviced queries, sorted by qbuf, addr, dnssec */ | 127 /** serviced queries, sorted by qbuf, addr, dnssec */ |
125 rbtree_t* serviced; | 128 rbtree_type* serviced; |
126 /** host cache, pointer but not owned by outnet. */ 127 struct infra_cache* infra; 128 /** where to get random numbers */ 129 struct ub_randstate* rnd; 130 /** ssl context to create ssl wrapped TCP with DNS connections */ 131 void* sslctx; 132#ifdef USE_DNSTAP 133 /** dnstap environment */ --- 68 unchanged lines hidden (view full) --- 202 struct comm_point* cp; 203}; 204 205/** 206 * A query that has an answer pending for it. 207 */ 208struct pending { 209 /** redblacktree entry, key is the pending struct(id, addr). */ | 129 /** host cache, pointer but not owned by outnet. */ 130 struct infra_cache* infra; 131 /** where to get random numbers */ 132 struct ub_randstate* rnd; 133 /** ssl context to create ssl wrapped TCP with DNS connections */ 134 void* sslctx; 135#ifdef USE_DNSTAP 136 /** dnstap environment */ --- 68 unchanged lines hidden (view full) --- 205 struct comm_point* cp; 206}; 207 208/** 209 * A query that has an answer pending for it. 210 */ 211struct pending { 212 /** redblacktree entry, key is the pending struct(id, addr). */ |
210 rbnode_t node; | 213 rbnode_type node; |
211 /** the ID for the query. int so that a value out of range can 212 * be used to signify a pending that is for certain not present in 213 * the rbtree. (and for which deletion is safe). */ 214 unsigned int id; 215 /** remote address. */ 216 struct sockaddr_storage addr; 217 /** length of addr field in use. */ 218 socklen_t addrlen; 219 /** comm point it was sent on (and reply must come back on). */ 220 struct port_comm* pc; 221 /** timeout event */ 222 struct comm_timer* timer; 223 /** callback for the timeout, error or reply to the message */ | 214 /** the ID for the query. int so that a value out of range can 215 * be used to signify a pending that is for certain not present in 216 * the rbtree. (and for which deletion is safe). */ 217 unsigned int id; 218 /** remote address. */ 219 struct sockaddr_storage addr; 220 /** length of addr field in use. */ 221 socklen_t addrlen; 222 /** comm point it was sent on (and reply must come back on). */ 223 struct port_comm* pc; 224 /** timeout event */ 225 struct comm_timer* timer; 226 /** callback for the timeout, error or reply to the message */ |
224 comm_point_callback_t* cb; | 227 comm_point_callback_type* cb; |
225 /** callback user argument */ 226 void* cb_arg; 227 /** the outside network it is part of */ 228 struct outside_network* outnet; 229 /** the corresponding serviced_query */ 230 struct serviced_query* sq; 231 232 /*---- filled if udp pending is waiting -----*/ --- 44 unchanged lines hidden (view full) --- 277 * allocated after the waiting_tcp structure. 278 * set to NULL when the query is serviced and it part of pending_tcp. 279 * if this is NULL, the next_waiting points to the pending_tcp. 280 */ 281 uint8_t* pkt; 282 /** length of query packet. */ 283 size_t pkt_len; 284 /** callback for the timeout, error or reply to the message */ | 228 /** callback user argument */ 229 void* cb_arg; 230 /** the outside network it is part of */ 231 struct outside_network* outnet; 232 /** the corresponding serviced_query */ 233 struct serviced_query* sq; 234 235 /*---- filled if udp pending is waiting -----*/ --- 44 unchanged lines hidden (view full) --- 280 * allocated after the waiting_tcp structure. 281 * set to NULL when the query is serviced and it part of pending_tcp. 282 * if this is NULL, the next_waiting points to the pending_tcp. 283 */ 284 uint8_t* pkt; 285 /** length of query packet. */ 286 size_t pkt_len; 287 /** callback for the timeout, error or reply to the message */ |
285 comm_point_callback_t* cb; | 288 comm_point_callback_type* cb; |
286 /** callback user argument */ 287 void* cb_arg; 288 /** if it uses ssl upstream */ 289 int ssl_upstream; | 289 /** callback user argument */ 290 void* cb_arg; 291 /** if it uses ssl upstream */ 292 int ssl_upstream; |
293 /** ref to the tls_auth_name from the serviced_query */ 294 char* tls_auth_name; |
|
290}; 291 292/** 293 * Callback to party interested in serviced query results. 294 */ 295struct service_callback { 296 /** next in callback list */ 297 struct service_callback* next; 298 /** callback function */ | 295}; 296 297/** 298 * Callback to party interested in serviced query results. 299 */ 300struct service_callback { 301 /** next in callback list */ 302 struct service_callback* next; 303 /** callback function */ |
299 comm_point_callback_t* cb; | 304 comm_point_callback_type* cb; |
300 /** user argument for callback function */ 301 void* cb_arg; 302}; 303 304/** fallback size for fragmentation for EDNS in IPv4 */ 305#define EDNS_FRAG_SIZE_IP4 1472 306/** fallback size for EDNS in IPv6, fits one fragment with ip6-tunnel-ids */ 307#define EDNS_FRAG_SIZE_IP6 1232 308 309/** 310 * Query service record. 311 * Contains query and destination. UDP, TCP, EDNS are all tried. 312 * complete with retries and timeouts. A number of interested parties can 313 * receive a callback. 314 */ 315struct serviced_query { 316 /** The rbtree node, key is this record */ | 305 /** user argument for callback function */ 306 void* cb_arg; 307}; 308 309/** fallback size for fragmentation for EDNS in IPv4 */ 310#define EDNS_FRAG_SIZE_IP4 1472 311/** fallback size for EDNS in IPv6, fits one fragment with ip6-tunnel-ids */ 312#define EDNS_FRAG_SIZE_IP6 1232 313 314/** 315 * Query service record. 316 * Contains query and destination. UDP, TCP, EDNS are all tried. 317 * complete with retries and timeouts. A number of interested parties can 318 * receive a callback. 319 */ 320struct serviced_query { 321 /** The rbtree node, key is this record */ |
317 rbnode_t node; | 322 rbnode_type node; |
318 /** The query that needs to be answered. Starts with flags u16, 319 * then qdcount, ..., including qname, qtype, qclass. Does not include 320 * EDNS record. */ 321 uint8_t* qbuf; 322 /** length of qbuf. */ 323 size_t qbuflen; 324 /** If an EDNS section is included, the DO/CD bit will be turned on. */ 325 int dnssec; 326 /** We want signatures, or else the answer is likely useless */ 327 int want_dnssec; 328 /** ignore capsforid */ 329 int nocaps; 330 /** tcp upstream used, use tcp, or ssl_upstream for SSL */ 331 int tcp_upstream, ssl_upstream; | 323 /** The query that needs to be answered. Starts with flags u16, 324 * then qdcount, ..., including qname, qtype, qclass. Does not include 325 * EDNS record. */ 326 uint8_t* qbuf; 327 /** length of qbuf. */ 328 size_t qbuflen; 329 /** If an EDNS section is included, the DO/CD bit will be turned on. */ 330 int dnssec; 331 /** We want signatures, or else the answer is likely useless */ 332 int want_dnssec; 333 /** ignore capsforid */ 334 int nocaps; 335 /** tcp upstream used, use tcp, or ssl_upstream for SSL */ 336 int tcp_upstream, ssl_upstream; |
337 /** the name of the tls authentication name, eg. 'ns.example.com' 338 * or NULL */ 339 char* tls_auth_name; |
|
332 /** where to send it */ 333 struct sockaddr_storage addr; 334 /** length of addr field in use. */ 335 socklen_t addrlen; 336 /** zone name, uncompressed domain name in wireformat */ 337 uint8_t* zone; 338 /** length of zone name */ 339 size_t zonelen; --- 6 unchanged lines hidden (view full) --- 346 /** UDP with EDNS sent */ 347 serviced_query_UDP_EDNS, 348 /** UDP without EDNS sent */ 349 serviced_query_UDP, 350 /** TCP with EDNS sent */ 351 serviced_query_TCP_EDNS, 352 /** TCP without EDNS sent */ 353 serviced_query_TCP, | 340 /** where to send it */ 341 struct sockaddr_storage addr; 342 /** length of addr field in use. */ 343 socklen_t addrlen; 344 /** zone name, uncompressed domain name in wireformat */ 345 uint8_t* zone; 346 /** length of zone name */ 347 size_t zonelen; --- 6 unchanged lines hidden (view full) --- 354 /** UDP with EDNS sent */ 355 serviced_query_UDP_EDNS, 356 /** UDP without EDNS sent */ 357 serviced_query_UDP, 358 /** TCP with EDNS sent */ 359 serviced_query_TCP_EDNS, 360 /** TCP without EDNS sent */ 361 serviced_query_TCP, |
354 /** probe to test EDNS lameness (EDNS is dropped) */ 355 serviced_query_PROBE_EDNS, | |
356 /** probe to test noEDNS0 (EDNS gives FORMERRorNOTIMP) */ 357 serviced_query_UDP_EDNS_fallback, 358 /** probe to test TCP noEDNS0 (EDNS gives FORMERRorNOTIMP) */ 359 serviced_query_TCP_EDNS_fallback, 360 /** send UDP query with EDNS1480 (or 1280) */ 361 serviced_query_UDP_EDNS_FRAG 362 } 363 /** variable with current status */ 364 status; 365 /** true if serviced_query is scheduled for deletion already */ 366 int to_be_deleted; 367 /** number of UDP retries */ 368 int retry; 369 /** time last UDP was sent */ 370 struct timeval last_sent_time; | 362 /** probe to test noEDNS0 (EDNS gives FORMERRorNOTIMP) */ 363 serviced_query_UDP_EDNS_fallback, 364 /** probe to test TCP noEDNS0 (EDNS gives FORMERRorNOTIMP) */ 365 serviced_query_TCP_EDNS_fallback, 366 /** send UDP query with EDNS1480 (or 1280) */ 367 serviced_query_UDP_EDNS_FRAG 368 } 369 /** variable with current status */ 370 status; 371 /** true if serviced_query is scheduled for deletion already */ 372 int to_be_deleted; 373 /** number of UDP retries */ 374 int retry; 375 /** time last UDP was sent */ 376 struct timeval last_sent_time; |
371 /** rtt of last (UDP) message */ | 377 /** rtt of last message */ |
372 int last_rtt; 373 /** do we know edns probe status already, for UDP_EDNS queries */ 374 int edns_lame_known; 375 /** edns options to use for sending upstream packet */ 376 struct edns_option* opt_list; 377 /** outside network this is part of */ 378 struct outside_network* outnet; 379 /** list of interested parties that need callback on results. */ --- 55 unchanged lines hidden (view full) --- 435 * @param sq: serviced query. 436 * @param packet: wireformat query to send to destination. 437 * @param timeout: in milliseconds from now. 438 * @param callback: function to call on error, timeout or reply. 439 * @param callback_arg: user argument for callback function. 440 * @return: NULL on error for malloc or socket. Else the pending query object. 441 */ 442struct pending* pending_udp_query(struct serviced_query* sq, | 378 int last_rtt; 379 /** do we know edns probe status already, for UDP_EDNS queries */ 380 int edns_lame_known; 381 /** edns options to use for sending upstream packet */ 382 struct edns_option* opt_list; 383 /** outside network this is part of */ 384 struct outside_network* outnet; 385 /** list of interested parties that need callback on results. */ --- 55 unchanged lines hidden (view full) --- 441 * @param sq: serviced query. 442 * @param packet: wireformat query to send to destination. 443 * @param timeout: in milliseconds from now. 444 * @param callback: function to call on error, timeout or reply. 445 * @param callback_arg: user argument for callback function. 446 * @return: NULL on error for malloc or socket. Else the pending query object. 447 */ 448struct pending* pending_udp_query(struct serviced_query* sq, |
443 struct sldns_buffer* packet, int timeout, comm_point_callback_t* callback, | 449 struct sldns_buffer* packet, int timeout, comm_point_callback_type* callback, |
444 void* callback_arg); 445 446/** 447 * Send TCP query. May wait for TCP buffer. Selects ID to be random, and 448 * checks id. 449 * @param sq: serviced query. 450 * @param packet: wireformat query to send to destination. copied from. | 450 void* callback_arg); 451 452/** 453 * Send TCP query. May wait for TCP buffer. Selects ID to be random, and 454 * checks id. 455 * @param sq: serviced query. 456 * @param packet: wireformat query to send to destination. copied from. |
451 * @param timeout: in seconds from now. | 457 * @param timeout: in milliseconds from now. |
452 * Timer starts running now. Timer may expire if all buffers are used, 453 * without any query been sent to the server yet. 454 * @param callback: function to call on error, timeout or reply. 455 * @param callback_arg: user argument for callback function. 456 * @return: false on error for malloc or socket. Else the pending TCP object. 457 */ 458struct waiting_tcp* pending_tcp_query(struct serviced_query* sq, | 458 * Timer starts running now. Timer may expire if all buffers are used, 459 * without any query been sent to the server yet. 460 * @param callback: function to call on error, timeout or reply. 461 * @param callback_arg: user argument for callback function. 462 * @return: false on error for malloc or socket. Else the pending TCP object. 463 */ 464struct waiting_tcp* pending_tcp_query(struct serviced_query* sq, |
459 struct sldns_buffer* packet, int timeout, comm_point_callback_t* callback, | 465 struct sldns_buffer* packet, int timeout, comm_point_callback_type* callback, |
460 void* callback_arg); 461 462/** 463 * Delete pending answer. 464 * @param outnet: outside network the pending query is part of. 465 * Internal feature: if outnet is NULL, p is not unlinked from rbtree. 466 * @param p: deleted 467 */ 468void pending_delete(struct outside_network* outnet, struct pending* p); 469 470/** 471 * Perform a serviced query to the authoritative servers. 472 * Duplicate efforts are detected, and EDNS, TCP and UDP retry is performed. 473 * @param outnet: outside network, with rbtree of serviced queries. | 466 void* callback_arg); 467 468/** 469 * Delete pending answer. 470 * @param outnet: outside network the pending query is part of. 471 * Internal feature: if outnet is NULL, p is not unlinked from rbtree. 472 * @param p: deleted 473 */ 474void pending_delete(struct outside_network* outnet, struct pending* p); 475 476/** 477 * Perform a serviced query to the authoritative servers. 478 * Duplicate efforts are detected, and EDNS, TCP and UDP retry is performed. 479 * @param outnet: outside network, with rbtree of serviced queries. |
474 * @param qname: what qname to query. 475 * @param qnamelen: length of qname in octets including 0 root label. 476 * @param qtype: rrset type to query (host format) 477 * @param qclass: query class. (host format) | 480 * @param qinfo: query info. |
478 * @param flags: flags u16 (host format), includes opcode, CD bit. 479 * @param dnssec: if set, DO bit is set in EDNS queries. 480 * If the value includes BIT_CD, CD bit is set when in EDNS queries. 481 * If the value includes BIT_DO, DO bit is set when in EDNS queries. 482 * @param want_dnssec: signatures are needed, without EDNS the answer is 483 * likely to be useless. 484 * @param nocaps: ignore use_caps_for_id and use unperturbed qname. 485 * @param tcp_upstream: use TCP for upstream queries. 486 * @param ssl_upstream: use SSL for upstream queries. | 481 * @param flags: flags u16 (host format), includes opcode, CD bit. 482 * @param dnssec: if set, DO bit is set in EDNS queries. 483 * If the value includes BIT_CD, CD bit is set when in EDNS queries. 484 * If the value includes BIT_DO, DO bit is set when in EDNS queries. 485 * @param want_dnssec: signatures are needed, without EDNS the answer is 486 * likely to be useless. 487 * @param nocaps: ignore use_caps_for_id and use unperturbed qname. 488 * @param tcp_upstream: use TCP for upstream queries. 489 * @param ssl_upstream: use SSL for upstream queries. |
487 * @param opt_list: pass edns option list (deep copied into serviced query) 488 * these options are set on the outgoing packets. 489 * @param callback: callback function. 490 * @param callback_arg: user argument to callback function. | 490 * @param tls_auth_name: when ssl_upstream is true, use this name to check 491 * the server's peer certificate. |
491 * @param addr: to which server to send the query. 492 * @param addrlen: length of addr. 493 * @param zone: name of the zone of the delegation point. wireformat dname. 494 This is the delegation point name for which the server is deemed 495 authoritative. 496 * @param zonelen: length of zone. | 492 * @param addr: to which server to send the query. 493 * @param addrlen: length of addr. 494 * @param zone: name of the zone of the delegation point. wireformat dname. 495 This is the delegation point name for which the server is deemed 496 authoritative. 497 * @param zonelen: length of zone. |
498 * @param qstate: module qstate. Mainly for inspecting the available 499 * edns_opts_lists. 500 * @param callback: callback function. 501 * @param callback_arg: user argument to callback function. |
|
497 * @param buff: scratch buffer to create query contents in. Empty on exit. | 502 * @param buff: scratch buffer to create query contents in. Empty on exit. |
503 * @param env: the module environment. |
|
498 * @return 0 on error, or pointer to serviced query that is used to answer 499 * this serviced query may be shared with other callbacks as well. 500 */ 501struct serviced_query* outnet_serviced_query(struct outside_network* outnet, | 504 * @return 0 on error, or pointer to serviced query that is used to answer 505 * this serviced query may be shared with other callbacks as well. 506 */ 507struct serviced_query* outnet_serviced_query(struct outside_network* outnet, |
502 uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, 503 uint16_t flags, int dnssec, int want_dnssec, int nocaps, 504 int tcp_upstream, int ssl_upstream, struct edns_option* opt_list, | 508 struct query_info* qinfo, uint16_t flags, int dnssec, int want_dnssec, 509 int nocaps, int tcp_upstream, int ssl_upstream, char* tls_auth_name, |
505 struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* zone, | 510 struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* zone, |
506 size_t zonelen, comm_point_callback_t* callback, void* callback_arg, 507 struct sldns_buffer* buff); | 511 size_t zonelen, struct module_qstate* qstate, 512 comm_point_callback_type* callback, void* callback_arg, 513 struct sldns_buffer* buff, struct module_env* env); |
508 509/** 510 * Remove service query callback. 511 * If that leads to zero callbacks, the query is completely cancelled. 512 * @param sq: serviced query to adjust. 513 * @param cb_arg: callback argument of callback that needs removal. 514 * same as the callback_arg to outnet_serviced_query(). 515 */ --- 11 unchanged lines hidden (view full) --- 527 * Get memory size in use by serviced query while it is servicing callbacks. 528 * This takes into account the pre-deleted status of it; it will be deleted 529 * when the callbacks are done. 530 * @param sq: serviced query. 531 * @return size in bytes. 532 */ 533size_t serviced_get_mem(struct serviced_query* sq); 534 | 514 515/** 516 * Remove service query callback. 517 * If that leads to zero callbacks, the query is completely cancelled. 518 * @param sq: serviced query to adjust. 519 * @param cb_arg: callback argument of callback that needs removal. 520 * same as the callback_arg to outnet_serviced_query(). 521 */ --- 11 unchanged lines hidden (view full) --- 533 * Get memory size in use by serviced query while it is servicing callbacks. 534 * This takes into account the pre-deleted status of it; it will be deleted 535 * when the callbacks are done. 536 * @param sq: serviced query. 537 * @return size in bytes. 538 */ 539size_t serviced_get_mem(struct serviced_query* sq); 540 |
541/** get TCP file descriptor for address, returns -1 on failure, 542 * tcp_mss is 0 or maxseg size to set for TCP packets. */ 543int outnet_get_tcp_fd(struct sockaddr_storage* addr, socklen_t addrlen, int tcp_mss); 544 545/** 546 * Create udp commpoint suitable for sending packets to the destination. 547 * @param outnet: outside_network with the comm_base it is attached to, 548 * with the outgoing interfaces chosen from, and rnd gen for random. 549 * @param cb: callback function for the commpoint. 550 * @param cb_arg: callback argument for cb. 551 * @param to_addr: intended destination. 552 * @param to_addrlen: length of to_addr. 553 * @return commpoint that you can comm_point_send_udp_msg with, or NULL. 554 */ 555struct comm_point* outnet_comm_point_for_udp(struct outside_network* outnet, 556 comm_point_callback_type* cb, void* cb_arg, 557 struct sockaddr_storage* to_addr, socklen_t to_addrlen); 558 559/** 560 * Create tcp commpoint suitable for communication to the destination. 561 * It also performs connect() to the to_addr. 562 * @param outnet: outside_network with the comm_base it is attached to, 563 * and the tcp_mss. 564 * @param cb: callback function for the commpoint. 565 * @param cb_arg: callback argument for cb. 566 * @param to_addr: intended destination. 567 * @param to_addrlen: length of to_addr. 568 * @param query: initial packet to send writing, in buffer. It is copied 569 * to the commpoint buffer that is created. 570 * @param timeout: timeout for the TCP connection. 571 * timeout in milliseconds, or -1 for no (change to the) timeout. 572 * So seconds*1000. 573 * @param ssl: set to true for TLS. 574 * @param host: hostname for host name verification of TLS (or NULL if no TLS). 575 * @return tcp_out commpoint, or NULL. 576 */ 577struct comm_point* outnet_comm_point_for_tcp(struct outside_network* outnet, 578 comm_point_callback_type* cb, void* cb_arg, 579 struct sockaddr_storage* to_addr, socklen_t to_addrlen, 580 struct sldns_buffer* query, int timeout, int ssl, char* host); 581 582/** 583 * Create http commpoint suitable for communication to the destination. 584 * Creates the http request buffer. It also performs connect() to the to_addr. 585 * @param outnet: outside_network with the comm_base it is attached to, 586 * and the tcp_mss. 587 * @param cb: callback function for the commpoint. 588 * @param cb_arg: callback argument for cb. 589 * @param to_addr: intended destination. 590 * @param to_addrlen: length of to_addr. 591 * @param timeout: timeout for the TCP connection. 592 * timeout in milliseconds, or -1 for no (change to the) timeout. 593 * So seconds*1000. 594 * @param ssl: set to true for https. 595 * @param host: hostname to use for the destination. part of http request. 596 * @param path: pathname to lookup, eg. name of the file on the destination. 597 * @return http_out commpoint, or NULL. 598 */ 599struct comm_point* outnet_comm_point_for_http(struct outside_network* outnet, 600 comm_point_callback_type* cb, void* cb_arg, 601 struct sockaddr_storage* to_addr, socklen_t to_addrlen, int timeout, 602 int ssl, char* host, char* path); 603 604/** connect tcp connection to addr, 0 on failure */ 605int outnet_tcp_connect(int s, struct sockaddr_storage* addr, socklen_t addrlen); 606 |
|
535/** callback for incoming udp answers from the network */ 536int outnet_udp_cb(struct comm_point* c, void* arg, int error, 537 struct comm_reply *reply_info); 538 539/** callback for pending tcp connections */ 540int outnet_tcp_cb(struct comm_point* c, void* arg, int error, 541 struct comm_reply *reply_info); 542 --- 24 unchanged lines hidden --- | 607/** callback for incoming udp answers from the network */ 608int outnet_udp_cb(struct comm_point* c, void* arg, int error, 609 struct comm_reply *reply_info); 610 611/** callback for pending tcp connections */ 612int outnet_tcp_cb(struct comm_point* c, void* arg, int error, 613 struct comm_reply *reply_info); 614 --- 24 unchanged lines hidden --- |