bitcoin/src
Ava Chow a961ad1beb
Merge bitcoin/bitcoin#30202: netbase: extend CreateSock() to support creating arbitrary sockets
1245d1388b netbase: extend CreateSock() to support creating arbitrary sockets (Vasil Dimov)

Pull request description:

  Allow the callers of `CreateSock()` to pass all 3 arguments to the `socket(2)` syscall. This makes it possible to create sockets of any domain/type/protocol. In addition to extending arguments, some extra safety checks were put in place.

  The need for this came up during the discussion in https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1618837102

ACKs for top commit:
  achow101:
    ACK 1245d1388b
  tdb3:
    re ACK 1245d1388b
  theStack:
    re-ACK 1245d1388b

Tree-SHA512: cc86b56121293ac98959aed0ed77812d20702ed7029b5a043586f46e74295779c5354bb0d5f9e80be6c29e535df980d34c1dbf609064fb7ea3e5ca0f0ed54d6b
2024-06-20 13:44:56 -04:00
..
bench Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
common Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
compat
config
consensus refactor: Rename CTransaction::nVersion to version 2024-06-07 13:55:23 -04:00
crc32c
crypto util: move HexStr and HexDigit from util to crypto 2024-05-16 17:16:08 +02:00
index refactor: remove warnings globals 2024-06-13 11:20:49 +01:00
init Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
interfaces util: add TransactionError includes and namespace declarations 2024-05-16 10:16:08 -05:00
ipc
kernel introduce and use the generalized node::Warnings interface 2024-06-13 11:20:48 +01:00
leveldb Update leveldb-subtree subtree to latest upstream 2024-06-13 13:17:57 +01:00
logging
minisketch Update minisketch subtree to latest master 2024-06-12 14:38:39 +01:00
node Merge bitcoin/bitcoin#30058: Encapsulate warnings in generalized node::Warnings and remove globals 2024-06-17 17:09:18 -04:00
policy Merge bitcoin/bitcoin#28984: Cluster size 2 package rbf 2024-06-17 17:22:43 -04:00
primitives Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
qt Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
rpc refactor: remove warnings globals 2024-06-13 11:20:49 +01:00
script Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
secp256k1 Update libsecp256k1 subtree to latest master 2024-05-16 10:35:52 +08:00
support
test Merge bitcoin/bitcoin#30202: netbase: extend CreateSock() to support creating arbitrary sockets 2024-06-20 13:44:56 -04:00
univalue test: Fix failing univalue float test 2024-04-16 16:35:12 +02:00
util Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
wallet Merge bitcoin/bitcoin#30307: fuzz: Fix wallet_bdb_parser 32-bit unhandled fseek error 2024-06-20 09:52:57 +01:00
zmq rpc: avoid copying into UniValue 2024-05-20 16:48:19 +00:00
.bear-tidy-config
.clang-format
.clang-tidy clang-tidy: Add bugprone-move-forwarding-reference check 2024-05-30 11:33:59 +01:00
addrdb.cpp scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes 2024-05-01 08:33:04 +02:00
addrdb.h
addresstype.cpp
addresstype.h
addrman_impl.h Remove timedata 2024-04-10 17:01:27 +02:00
addrman.cpp Merge bitcoin/bitcoin#28929: serialization: Support for multiple parameters 2024-05-15 15:09:56 -04:00
addrman.h
arith_uint256.cpp
arith_uint256.h
attributes.h
banman.cpp
banman.h net_processing: remove Misbehavior score and increments 2024-05-30 08:35:18 -04:00
base58.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
base58.h
bech32.cpp Reduce memory copying operations in bech32 encode 2024-06-05 13:18:13 +02:00
bech32.h refactor: Model the bech32 charlimit as an Enum 2024-05-13 12:07:47 +02:00
bip324.cpp
bip324.h
bitcoin-chainstate.cpp introduce and use the generalized node::Warnings interface 2024-06-13 11:20:48 +01:00
bitcoin-cli-res.rc
bitcoin-cli.cpp Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
bitcoin-tx-res.rc
bitcoin-tx.cpp Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
bitcoin-util-res.rc
bitcoin-util.cpp scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes 2024-05-01 08:33:04 +02:00
bitcoin-wallet-res.rc
bitcoin-wallet.cpp Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
bitcoind-res.rc
bitcoind.cpp refactor: remove warnings globals 2024-06-13 11:20:49 +01:00
blockencodings.cpp
blockencodings.h
blockfilter.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
blockfilter.h
chain.cpp
chain.h
chainparams.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
chainparams.h
chainparamsbase.cpp
chainparamsbase.h
chainparamsseeds.h
checkqueue.h
clientversion.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
clientversion.h scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes 2024-05-01 08:33:04 +02:00
coins.cpp log: use error level for critical log messages 2024-06-10 13:46:56 +02:00
coins.h
compressor.cpp
compressor.h refactor: Rename CTransaction::nVersion to version 2024-06-07 13:55:23 -04:00
core_io.h
core_memusage.h
core_read.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
core_write.cpp refactor: Rename CTransaction::nVersion to version 2024-06-07 13:55:23 -04:00
cuckoocache.h
dbwrapper.cpp
dbwrapper.h
deploymentinfo.cpp
deploymentinfo.h
deploymentstatus.cpp
deploymentstatus.h
dummywallet.cpp wallet, test: Be able to always swap BDB endianness 2024-05-16 15:03:13 -04:00
external_signer.cpp
external_signer.h
flatfile.cpp
flatfile.h
hash.cpp
hash.h
headerssync.cpp
headerssync.h
httprpc.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
httprpc.h
httpserver.cpp scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes 2024-05-01 08:33:04 +02:00
httpserver.h
i2p.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
i2p.h
indirectmap.h
init.cpp Merge bitcoin/bitcoin#30058: Encapsulate warnings in generalized node::Warnings and remove globals 2024-06-17 17:09:18 -04:00
init.h
key_io.cpp
key_io.h
key.cpp refactor: remove unused CKey::Negate method 2024-06-03 16:59:43 +02:00
key.h refactor: remove unused CKey::Negate method 2024-06-03 16:59:43 +02:00
logging.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
logging.h util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
Makefile.am introduce and use the generalized node::Warnings interface 2024-06-13 11:20:48 +01:00
Makefile.bench.include
Makefile.crc32c.include
Makefile.leveldb.include
Makefile.minisketch.include build: remove minisketch clz check 2024-04-12 14:28:34 +02:00
Makefile.qt_locale.include
Makefile.qt.include build, test, doc: Temporarily remove Android-related stuff 2024-05-06 11:29:14 +01:00
Makefile.qttest.include
Makefile.test_fuzz.include
Makefile.test_util.include
Makefile.test.include introduce and use the generalized node::Warnings interface 2024-06-13 11:20:48 +01:00
Makefile.univalue.include
mapport.cpp upnp: add compatibility for miniupnpc 2.2.8 2024-06-18 12:24:48 +00:00
mapport.h
memusage.h
merkleblock.cpp
merkleblock.h
net_permissions.cpp util: move fees.h and error.h to common/messages.h 2024-05-16 10:16:08 -05:00
net_permissions.h
net_processing.cpp Merge bitcoin/bitcoin#29575: net_processing: make any misbehavior trigger immediate discouragement 2024-06-20 13:28:38 -04:00
net_processing.h Merge bitcoin/bitcoin#29575: net_processing: make any misbehavior trigger immediate discouragement 2024-06-20 13:28:38 -04:00
net_types.cpp rpc: avoid copying into UniValue 2024-05-20 16:48:19 +00:00
net_types.h
net.cpp netbase: extend CreateSock() to support creating arbitrary sockets 2024-06-14 14:23:50 +02:00
net.h Merge bitcoin/bitcoin#29984: net: Replace ifname check with IFF_LOOPBACK in Discover 2024-05-07 10:28:58 +08:00
netaddress.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
netaddress.h util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
netbase.cpp netbase: extend CreateSock() to support creating arbitrary sockets 2024-06-14 14:23:50 +02:00
netbase.h netbase: extend CreateSock() to support creating arbitrary sockets 2024-06-14 14:23:50 +02:00
netgroup.cpp
netgroup.h
netmessagemaker.h
noui.cpp
noui.h
outputtype.cpp fix incorrect multisig redeem script size limit for segwit 2024-05-03 14:20:44 -03:00
outputtype.h fix incorrect multisig redeem script size limit for segwit 2024-05-03 14:20:44 -03:00
pow.cpp
pow.h
prevector.h
protocol.cpp
protocol.h Merge bitcoin/bitcoin#29421: net: make the list of known message types a compile time constant 2024-05-21 13:59:33 -04:00
psbt.cpp util: add TransactionError includes and namespace declarations 2024-05-16 10:16:08 -05:00
psbt.h Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
pubkey.cpp crypto: add NUMS_H const 2024-05-14 10:24:31 +02:00
pubkey.h crypto: add NUMS_H const 2024-05-14 10:24:31 +02:00
random.cpp scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes 2024-05-01 08:33:04 +02:00
random.h
randomenv.cpp scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes 2024-05-01 08:33:04 +02:00
randomenv.h
rest.cpp Merge bitcoin/bitcoin#29015: kernel: Streamline util library 2024-06-12 17:12:54 -04:00
rest.h
reverse_iterator.h
scheduler.cpp
scheduler.h
serialize.h Merge bitcoin/bitcoin#28929: serialization: Support for multiple parameters 2024-05-15 15:09:56 -04:00
signet.cpp refactor: Rename CTransaction::nVersion to version 2024-06-07 13:55:23 -04:00
signet.h
span.h
streams.cpp
streams.h
sync.cpp util: avoid using thread_local variable that has a destructor 2024-05-16 18:16:46 +02:00
sync.h
threadsafety.h
tinyformat.h
torcontrol.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
torcontrol.h
txdb.cpp
txdb.h
txmempool.cpp [[refactor]] Check CTxMemPool options in constructor 2024-05-17 23:37:25 +02:00
txmempool.h [[refactor]] Check CTxMemPool options in constructor 2024-05-17 23:37:25 +02:00
txorphanage.cpp scripted-diff: Replace nNextSweep with m_next_sweep 2024-05-29 09:02:07 -07:00
txorphanage.h scripted-diff: Replace nNextSweep with m_next_sweep 2024-05-29 09:02:07 -07:00
txrequest.cpp
txrequest.h
uint256.cpp
uint256.h
undo.h
validation.cpp Merge bitcoin/bitcoin#28984: Cluster size 2 package rbf 2024-06-17 17:22:43 -04:00
validation.h Merge bitcoin/bitcoin#28339: validation: improve performance of CheckBlockIndex 2024-06-11 16:41:44 -04:00
validationinterface.cpp
validationinterface.h
versionbits.cpp
versionbits.h
walletinitinterface.h