---
title: roNetworkAttached
slug: develop/ronetworkattached
docTags: 
createdAt: 2025-03-11T07:07:18.732Z
---

This object implements the *ifInt* and *ifString* interfaces to report the index of an attached [network interface](docId\:U6ZceYQddlz9xdAKtTmJs). Instances of this object are posted by [roNetworkHotplug](docId\:qjUpJH-HFFX_ggfQ66Uhv) when a configured network connection becomes available. For Ethernet, it may take some time after the cable is inserted for this to take place. The JavaScript equivalent is [networkhotplug](docId\:NEizLJQNwCice75OcWKoL).

## ifInt

### GetInt() As Integer

Returns the interface ID of the event. This method returns -1 VLAN interfaces; use `GetString()` to retrieve the interface name.

### SetInt(value As Integer) As Void

Sets the value that will be returned by `GetInt()`. 

## ifString

### GetString() As String

Returns the interface name ("eth0", "wlan0", "ppp0") of the *roNetworkConfiguration* instance associated with the event. 

### SetString(value As String) As Void

Sets the value that will be returned by `GetString()`. 

## ifUserData

### SetUserData(user\_data As Object)

Sets the user data.

### GetUserData() As Object

Returns the user data that has previously been set via `SetUserData()` (either on the source or event object). This method will return Invalid if no data has been set.
