linux/esptun.c
static bool is_prefix(const uint8_t *esp_buffer, size_t len, const uint8_t *prefix, size_t prefix_len)
{
    if (len < prefix_len) {
        return false;
    }
    for (size_t i = 0; i < prefix_len; ++i) {
        if (esp_buffer[i] != prefix[i]) {
            return false;
        }
    }
    return true;
}
/** Check if a buffer starts with a specified prefix. */
Check if a buffer starts with a specified prefix.
Check if a buffer starts with a specified prefix .
static bool is_prefix(const uint8_t *esp_buffer, size_t len, const uint8_t *prefix, size_t prefix_len)
{
    if (len < prefix_len) {
        return false;
    }
    for (size_t i = 0; i < prefix_len; ++i) {
        if (esp_buffer[i] != prefix[i]) {
            return false;
        }
    }
    return true;
}
static bool is_prefix ( const uint8_t * esp_buffer , size_t len , const uint8_t * prefix , size_t prefix_len ) { if ( len < prefix_len ) { return false ; } for ( size_t i = 0 ; i < prefix_len ; ++ i ) { if ( esp_buffer [ i ] != prefix [ i ] ) { return false ; } } return true ; }
Check if a buffer starts with a specified prefix.
Check if a buffer starts with a specified prefix .