---
title: TECGetAvailableSniffers
framework: Core Services
role: symbol
role_heading: Function
platforms: [macOS 10.0+]
path: coreservices/1571841-tecgetavailablesniffers
---

# TECGetAvailableSniffers

Returns the list of sniffers available in all installedplug-ins.

## Declaration

```occ
OSStatus TECGetAvailableSniffers(TextEncoding availableSniffers[], ItemCount maxAvailableSniffers, ItemCount *actualAvailableSniffers);
```

## Parameters

- `availableSniffers`: On return, an array of text encoding specifications that the available sniffers currently support. You should use the doc://com.apple.documentation/documentation/coreservices/1571795-teccountavailablesniffers function to determine what size array to allocate.
- `maxAvailableSniffers`: The number of text encoding specifications the availableSniffers array can contain.
- `actualAvailableSniffers`: On return, a pointer to the number of text encodings in the availableSniffers array.

## Return Value

Return Value A resultcode. See Result Codes.

## Discussion

Discussion This function ignores duplicate text encoding specifications.If you used the  TECCountAvailableSniffers function to determine the size of the TECGetAvailableSniffers array,the number of available encodings may be fewer than the number ofarray elements, because TECCountAvailableSniffers includesduplicate text encoding specifications in its count.

## See Also

### Using Sniffers to Investigate Encodings

- [TECCreateSniffer](coreservices/1571832-teccreatesniffer.md)
- [TECClearSnifferContextInfo](coreservices/1571850-tecclearsniffercontextinfo.md)
- [TECDisposeSniffer](coreservices/1571854-tecdisposesniffer.md)
- [TECCountAvailableSniffers](coreservices/1571795-teccountavailablesniffers.md)
- [TECSniffTextEncoding](coreservices/1571836-tecsnifftextencoding.md)
