VFS NanoCoAP helper functions.  
More...
VFS NanoCoAP helper functions. 
VFS NanoCoAP helper functions
- Author
 - Benjamin Valentin benja.nosp@m.min..nosp@m.valen.nosp@m.tin@.nosp@m.ml-pa.nosp@m..com 
 
Definition in file nanocoap_vfs.h.
 
Go to the source code of this file.
| int  | nanocoap_vfs_get_url (const char *url, const char *dst) | 
|   | Downloads the resource behind url via blockwise GET and stores it in the file dst.  More...
  | 
|   | 
| int  | nanocoap_vfs_get (nanocoap_sock_t *sock, const char *path, const char *dst) | 
|   | Downloads the resource behind path via blockwise GET and stores it in the file dst.  More...
  | 
|   | 
| int  | nanocoap_vfs_put_url (const char *url, const char *src, void *work_buf, size_t work_buf_len) | 
|   | Uploads the file to url via blockwise PUT.  More...
  | 
|   | 
| int  | nanocoap_vfs_put (nanocoap_sock_t *sock, const char *path, const char *src, void *work_buf, size_t work_buf_len) | 
|   | Uploads the file to path via blockwise PUT.  More...
  | 
|   | 
◆ nanocoap_vfs_get()
      
        
          | int nanocoap_vfs_get  | 
          ( | 
          nanocoap_sock_t *  | 
          sock,  | 
        
        
           | 
           | 
          const char *  | 
          path,  | 
        
        
           | 
           | 
          const char *  | 
          dst  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Downloads the resource behind path via blockwise GET and stores it in the file dst. 
- Parameters
 - 
  
    | [in] | sock | Connection to the server  | 
    | [in] | path | Remote query path to the resource  | 
    | [in] | dst | Local path to the destination file | 
  
   
- Returns
 - 0 on success 
 
- 
<0 on error 
 
 
 
◆ nanocoap_vfs_get_url()
      
        
          | int nanocoap_vfs_get_url  | 
          ( | 
          const char *  | 
          url,  | 
        
        
           | 
           | 
          const char *  | 
          dst  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Downloads the resource behind url via blockwise GET and stores it in the file dst. 
- Parameters
 - 
  
    | [in] | url | URL to the resource  | 
    | [in] | dst | Path to the destination file | 
  
   
- Returns
 - 0 on success 
 
- 
<0 on error 
 
 
 
◆ nanocoap_vfs_put()
      
        
          | int nanocoap_vfs_put  | 
          ( | 
          nanocoap_sock_t *  | 
          sock,  | 
        
        
           | 
           | 
          const char *  | 
          path,  | 
        
        
           | 
           | 
          const char *  | 
          src,  | 
        
        
           | 
           | 
          void *  | 
          work_buf,  | 
        
        
           | 
           | 
          size_t  | 
          work_buf_len  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Uploads the file to path via blockwise PUT. 
- Parameters
 - 
  
    | [in] | sock | Connection to the server  | 
    | [in] | path | Remote query path to the resource  | 
    | [in] | src | Path to the source file  | 
    | [in] | work_buf | Buffer to read file blocks into  | 
    | [in] | work_buf_len | Size of the buffer. Should be 1 byte more than the desired CoAP blocksize. | 
  
   
- Returns
 - 0 on success 
 
- 
<0 on error 
 
 
 
◆ nanocoap_vfs_put_url()
      
        
          | int nanocoap_vfs_put_url  | 
          ( | 
          const char *  | 
          url,  | 
        
        
           | 
           | 
          const char *  | 
          src,  | 
        
        
           | 
           | 
          void *  | 
          work_buf,  | 
        
        
           | 
           | 
          size_t  | 
          work_buf_len  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Uploads the file to url via blockwise PUT. 
- Parameters
 - 
  
    | [in] | url | URL to the resource  | 
    | [in] | src | Path to the source file  | 
    | [in] | work_buf | Buffer to read file blocks into  | 
    | [in] | work_buf_len | Size of the buffer. Should be 1 byte more than the desired CoAP blocksize. | 
  
   
- Returns
 - 0 on success 
 
- 
<0 on error