--- ethercat-1.5.2/include/ecrt.h.orig	2013-02-21 03:58:50.000000000 -0500
+++ ethercat-1.5.2/include/ecrt.h	2013-02-21 03:46:12.000000000 -0500
@@ -1010,6 +1010,14 @@
                                        */
         );
 
+/* Initiates a full slave rescan.
+ *
+ * \return Zero on success, otherwise negative error code.
+ */
+int ecrt_master_rescan(
+        const ec_master_t *master
+        );
+
 /** Sets the application time.
  *
  * The master has to know the application's time when operating slaves with
--- ethercat-1.5.2/lib/master.c.orig	2013-02-21 03:58:37.000000000 -0500
+++ ethercat-1.5.2/lib/master.c	2013-02-21 03:44:36.000000000 -0500
@@ -666,6 +666,22 @@
 
 /****************************************************************************/
 
+int ecrt_master_rescan(const ec_master_t *master)
+{
+    int ret;
+
+    ret = ioctl(master->fd, EC_IOCTL_MASTER_RESCAN, 0);
+    if (EC_IOCTL_IS_ERROR(ret)) {
+        fprintf(stderr, "Failed to initiate rescan: %s\n",
+                strerror(EC_IOCTL_ERRNO(ret)));
+        return -EC_IOCTL_ERRNO(ret);
+    }
+
+    return 0;
+}
+
+/****************************************************************************/
+
 void ecrt_master_application_time(ec_master_t *master, uint64_t app_time)
 {
     ec_ioctl_app_time_t data;
