{"id":4048,"date":"2022-12-20T17:28:49","date_gmt":"2022-12-20T20:28:49","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/bio-man7\/"},"modified":"2022-12-20T17:28:49","modified_gmt":"2022-12-20T20:28:49","slug":"bio-man7","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/bio-man7\/","title":{"rendered":"BIO (man7)"},"content":{"rendered":"<h1 align=\"center\">BIO<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COPYRIGHT\">COPYRIGHT<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">bio \u2212 Basic I\/O abstraction<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">#include <openssl\/bio.h><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">A <small>BIO<\/small> is an I\/O abstraction, it hides many of the underlying I\/O details from an application. If an application uses a <small>BIO<\/small> for its I\/O it can transparently handle <small>SSL<\/small> connections, unencrypted network connections and file I\/O.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">There are two type of <small>BIO,<\/small> a source\/sink <small>BIO<\/small> and a filter <small>BIO.<\/small><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">As its name implies a source\/sink <small>BIO<\/small> is a source and\/or sink of data, examples include a socket <small>BIO<\/small> and a file <small>BIO.<\/small><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">A filter <small>BIO<\/small> takes data from one <small>BIO<\/small> and passes it through to another, or the application. The data may be left unmodified (for example a message digest <small>BIO<\/small> ) or translated (for example an encryption <small>BIO<\/small> ). The effect of a filter <small>BIO<\/small> may change according to the I\/O operation it is performing: for example an encryption <small>BIO<\/small> will encrypt data if it is being written to and decrypt data if it is being read from.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">BIOs can be joined together to form a chain (a single <small>BIO<\/small> is a chain with one component). A chain normally consist of one source\/sink <small>BIO<\/small> and one or more filter BIOs. Data read from or written to the first <small>BIO<\/small> then traverses the chain to the end (normally a source\/sink <small>BIO<\/small> ).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Some BIOs (such as memory BIOs) can be used immediately after calling <b>BIO_new()<\/b>. Others (such as file BIOs) need some additional initialization, and frequently a utility function exists to create and initialize such BIOs.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If <b>BIO_free()<\/b> is called on a <small>BIO<\/small> chain it will only free one <small>BIO<\/small> resulting in a memory leak.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Calling <b>BIO_free_all()<\/b> on a single <small>BIO<\/small> has the same effect as calling <b>BIO_free()<\/b> on it other than the discarded return value.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Normally the <b>type<\/b> argument is supplied by a function which returns a pointer to a <small>BIO_METHOD.<\/small> There is a naming convention for such functions: a source\/sink <small>BIO<\/small> is normally called BIO_s_*() and a filter <small>BIO<\/small> BIO_f_*();<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Create a memory <small>BIO:<\/small><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">BIO *mem = BIO_new(BIO_s_mem());<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>BIO_ctrl<\/b>(3), <b>BIO_f_base64<\/b>(3), <b>BIO_f_buffer<\/b>(3), <b>BIO_f_cipher<\/b>(3), <b>BIO_f_md<\/b>(3), <b>BIO_f_null<\/b>(3), <b>BIO_f_ssl<\/b>(3), <b>BIO_find_type<\/b>(3), <b>BIO_new<\/b>(3), <b>BIO_new_bio_pair<\/b>(3), <b>BIO_push<\/b>(3), <b>BIO_read_ex<\/b>(3), <b>BIO_s_accept<\/b>(3), <b>BIO_s_bio<\/b>(3), <b>BIO_s_connect<\/b>(3), <b>BIO_s_fd<\/b>(3), <b>BIO_s_file<\/b>(3), <b>BIO_s_mem<\/b>(3), <b>BIO_s_null<\/b>(3), <b>BIO_s_socket<\/b>(3), <b>BIO_set_callback<\/b>(3), <b>BIO_should_retry<\/b>(3)<\/p>\n<h2>COPYRIGHT <a name=\"COPYRIGHT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Copyright 2000\u22122019 The OpenSSL Project Authors. All Rights Reserved.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Licensed under the OpenSSL license (the &#8220;License&#8221;). You may not use this file except in compliance with the License. You can obtain a copy in the file <small>LICENSE<\/small> in the source distribution or at <https:\/\/www.openssl.org\/source\/license.html>.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  bio \u2212 Basic I\/O abstraction <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[971],"tags":[973,1130,972],"class_list":["post-4048","post","type-post","status-publish","format-standard","hentry","category-7-miscelanea","tag-973","tag-bio","tag-man7"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4048","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4048"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4048\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4048"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4048"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4048"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}