Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changelog for coreHTTP Client Library


## v3.0.0 (Aug 2022)
## v3.0.0 (October 2022)

### Updates

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ safety and data structure invariance through the

See memory requirements for this library [here](./docs/doxygen/include/size_table.md).

**coreHTTP v3.0.0 [source code](https://github.com/FreeRTOS/coreHTTP/tree/v3.0.0/source) is part of the [FreeRTOS 202210.00 LTS](https://github.com/FreeRTOS/FreeRTOS-LTS/tree/202210.00-LTS) release.**

**coreHTTP v2.0.0 [source code](https://github.com/FreeRTOS/coreHTTP/tree/v2.0.0/source) is part of the [FreeRTOS 202012.00 LTS](https://github.com/FreeRTOS/FreeRTOS-LTS/tree/202012.00-LTS) release.**

## coreHTTP Config File
Expand Down
7 changes: 7 additions & 0 deletions lexicon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ init
initializerequestheaders
int
iot
ioveccount
ip
isfield
isheaderresponse
isheadresponse
Expand All @@ -140,6 +142,7 @@ memmove
methodlen
min
misra
mit
mqtt
msg
mynetworkrecvimplementation
Expand Down Expand Up @@ -185,6 +188,7 @@ pheaders
phost
phttpparser
phttpparsingcontext
piovec
plaintext
plastheaderfield
plastheadervalue
Expand Down Expand Up @@ -243,11 +247,13 @@ sendpartialcall
sensitivity
sizeof
snprintf
spdx
statuscode
strchr
strerror
strncpy
struct
structs
sublicense
tcp
tcpsocketcontext
Expand Down Expand Up @@ -278,4 +284,5 @@ url
valuefound
valuelen
valueloc
writev
xxxx
2 changes: 2 additions & 0 deletions source/core_http_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
2 changes: 2 additions & 0 deletions source/include/core_http_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
2 changes: 2 additions & 0 deletions source/include/core_http_client_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
2 changes: 2 additions & 0 deletions source/include/core_http_config_defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
55 changes: 53 additions & 2 deletions source/interface/transport_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down Expand Up @@ -243,15 +245,64 @@ typedef int32_t ( * TransportSend_t )( NetworkContext_t * pNetworkContext,
size_t bytesToSend );
/* @[define_transportsend] */

/**
* @brief Transport vector structure for sending multiple messages.
*/
typedef struct TransportOutVector
{
/**
* @brief Base address of data.
*/
const void * iov_base;

/**
* @brief Length of data in buffer.
*/
size_t iov_len;
} TransportOutVector_t;

/**
* @transportcallback
* @brief Transport interface function for "vectored" / scatter-gather based
* writes. This function is expected to iterate over the list of vectors pIoVec
* having ioVecCount entries containing portions of one MQTT message at a maximum.
* If the proper functionality is available, then the data in the list should be
* copied to the underlying TCP buffer before flushing the buffer. Implementing it
* in this fashion will lead to sending of fewer TCP packets for all the values
* in the list.
*
* @note If the proper write functionality is not present for a given device/IP-stack,
* then there is no strict requirement to implement write. Only the send and recv
* interfaces must be defined for the application to work properly.
*
* @param[in] pNetworkContext Implementation-defined network context.
* @param[in] pIoVec An array of TransportIoVector_t structs.
* @param[in] ioVecCount Number of TransportIoVector_t in pIoVec.
*
* @return The number of bytes written or a negative value to indicate error.
*
* @note If no data is written to the buffer due to the buffer being full this MUST
* return zero as the return value.
* A zero return value SHOULD represent that the write operation can be retried
* by calling the API function. Zero MUST NOT be returned if a network disconnection
* has occurred.
*/
/* @[define_transportwritev] */
typedef int32_t ( * TransportWritev_t )( NetworkContext_t * pNetworkContext,
TransportOutVector_t * pIoVec,
size_t ioVecCount );
/* @[define_transportwritev] */

/**
* @transportstruct
* @brief The transport layer interface.
*/
/* @[define_transportinterface] */
typedef struct TransportInterface
{
TransportRecv_t recv; /**< Transport receive interface. */
TransportSend_t send; /**< Transport send interface. */
TransportRecv_t recv; /**< Transport receive function pointer. */
TransportSend_t send; /**< Transport send function pointer. */
TransportWritev_t writev; /**< Transport writev function pointer. */
NetworkContext_t * pNetworkContext; /**< Implementation-defined network context. */
} TransportInterface_t;
/* @[define_transportinterface] */
Expand Down
2 changes: 2 additions & 0 deletions test/cbmc/include/callback_stubs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
2 changes: 2 additions & 0 deletions test/cbmc/include/core_http_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
2 changes: 2 additions & 0 deletions test/cbmc/include/get_time_stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
2 changes: 2 additions & 0 deletions test/cbmc/include/http_cbmc_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
2 changes: 2 additions & 0 deletions test/cbmc/include/transport_interface_stubs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
2 changes: 2 additions & 0 deletions test/cbmc/proofs/HTTPClient_Send/HTTPClient_Send_harness.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
2 changes: 2 additions & 0 deletions test/cbmc/sources/http_cbmc_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
2 changes: 2 additions & 0 deletions test/cbmc/stubs/HTTPClient_ReadHeader_llhttp_execute.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
2 changes: 2 additions & 0 deletions test/cbmc/stubs/HTTPClient_Send_llhttp_execute.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
2 changes: 2 additions & 0 deletions test/cbmc/stubs/callback_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* coreHTTP v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
Expand Down
Loading